Solved

VB 6, VBA  - Saving word document as .pdf

Posted on 2007-11-26
2
1,857 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
In MS Word, rename styles in a batch 9 44
Regarding Notepad++ 4 43
word 2016 1 31
VBA Userform:  Can't get selected items in listbox from outside a hidden userform 6 27
I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

803 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