Some Word documents may contain embedded or linked files.
Microsoft calls this technology OLE (Object Linking and Embedding).
For example, when you drag-and-drop a file into a Word document, it
becomes an OLE attachment.
When PreserveAttachments = True, WordPrintJobEx performs extra
steps to grab the attached or linked files from the Word document.
Embedding and linking behave slightly differently:
When a file is embedded into a Word document, it will also be
embedded into the output PDF. Embedded files show up as a small
black pin icon in the output PDF. Only the following embedded
document formats are preserved: PDF, TXT, DOC, DOCX, XLS, XLSX,
PPT, PPTX. If you attach an RTF, Word immediately converts it into
a DOC file, so that's covered as well. All other types of
attachments are ignored. For example, Microsoft Picture, Charts,
Equation Editor, 3D Text, audio, video, Flash, XPS, AutoCAD are all
ignored until specific customer demand arises.
When an external file is linked to the Word document, it will
come out as a hyperlink in the output PDF. In this case there are
no restrictions regarding the file format, but the external file
must exist. It will not be physically embedded into the PDF.
Converting with attachment preservation could be noticeably
slower than without attachments.
NativeOfficePDF must be set to False, otherwise attachments are
PDF/A and PDF/X do not support embedded files. PDF/X does not
support linked files, either. If you attempt to create one, the
attachments/links will be silently missing, without any errors.
This has to do with PDF/A and PDF/X, not with easyPDF.
Set oPrinter = CreateObject("easyPDF.Printer.8")
Set oPrintJob = oPrinter.WordPrintJobEx
oPrintJob.PreserveAttachments = True' Preserve OLE attachments and links
oPrintJob.PrintOut "C:\test\input.docx", "C:\test\output.pdf"