Quantcast
Channel: Adobe Community : All Content - Creating PDFs
Viewing all articles
Browse latest Browse all 23252

Create PDF from VBA with same resolution as from the Ribbon

$
0
0

I am using Word 2010 and Acrobat X Standard. I have written a VBA application which creates a Word 2010 document and saves it as a PDF.

I have a problem with exporting to PDF from within Word 2010.

In Word 2010, I have specified File, Options, Advanced, Do not compress images and my images are saved in the Word document with high resolution.

On the Ribbon's Acrobat tag, I have created my own preferences with all compression and downsample turned off.

When I Create PDF from the ribbon, the resulting PDF document resolution is beautiful.

I used Word's Record Macro feature to capture the action taken:

 

   ActiveDocument.ExportAsFixedFormat _

      OutputFileName:="C:\Gary\Book Publishing\Projects\Problem With Images\Sample.pdf", _

      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

 

When I put this code into my Word VBA code, the images in the output PDF are at a much lower resolution. It feels like the Preferences are not being honoured.  Any ideas?


Viewing all articles
Browse latest Browse all 23252

Trending Articles