Solved

VB 6, VBA  - Saving word document as .pdf

Posted on 2007-11-26
2
1,838 Views
Last Modified: 2010-04-21
Hi

Is there a way in Word VBA to save a document as a .pdf file
0
Comment
Question by:murbro
2 Comments
 
LVL 12

Accepted Solution

by:
geneus earned 500 total points
ID: 20349658
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
 

Author Closing Comment

by:murbro
ID: 31410940
thanks very much
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now