[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1878
  • Last Modified:

VB 6, VBA - Saving word document as .pdf

Hi

Is there a way in Word VBA to save a document as a .pdf file
0
Murray Brown
Asked:
Murray Brown
1 Solution
 
geneusCommented:
You need to have a PDF Converter installed.

In Word 2003 and before:

If you have Adobe PDF installed, you can print to the PDF Printer
If you need a freeware version, try PrimoPDF, and Print to the Primo PDF Printer
NOTE: There are others

This is easier to handle in Word 2007:

In Word 2007 install the free 2007 Microsoft Office Add-in: Microsoft Save as PDF (http://www.microsoft.com/downloads/details.aspx?familyid=F1FC413C-6D89-4F15-991B-63B07BA5F2E5&displaylang=en)

    ActiveDocument.ExportAsFixedFormat OutputFileName:= _
        "FILENAME.pdf", ExportFormat:= _
        wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
        wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
        Item:=wdExportDocumentContent, IncludeDocProps:=False, KeepIRM:=True, _
        CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
        BitmapMissingFonts:=True, UseISO19005_1:=False
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks very much
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now