Quantcast
Viewing all articles
Browse latest Browse all 97529

Issues with converting Word files to PDF via macro

I have a weird issue with the Acrobat Add-In. I want to transform many Word files with the Add-In into PDF files. The printer is no option because it causes other problems.

So I created a small macro for Word that transforms all Word files of a directory into PDF files. The macro works fine but the PDF files don't look right.

 

I show you the issue with one Word file, first converted manually and then with macro:

 

First image:  If the file is converted manually, it looks as the Word file and the fonts are embedded.

Image may be NSFW.
Clik here to view.
convertedManually.png

Second image: If the macro converts the file it looks not correct and the fonts are mostly not embedded.

Image may be NSFW.
Clik here to view.
convertedWithMacro.png

I'm using Acrobat XI and Word 2010. The macro command is:

 

' new name for PDF
pdfName = Replace(Replace(verz & "\" & fi.Name, "docx", "pdf"), "doc", "pdf")            ' convert Word into PDF            ActiveDocument.ExportAsFixedFormat OutputFileName:= _                pdfName, ExportFormat:= _                wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _                wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _                Item:=wdExportDocumentContent, IncludeDocProps:=False, KeepIRM:=False, _                CreateBookmarks:=wdExportCreateHeadingBookmarks, DocStructureTags:=True, _                BitmapMissingFonts:=False, UseISO19005_1:=False

Viewing all articles
Browse latest Browse all 97529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>