AdobePDFMakerforOffice

A

Alistair F

I have a VBA application that creates Word 2003 documents and saves them. I'd
like to be able to create a pdf from the completed Word document. I can use
the Create PDF from the Word menu and notice that there is an AdobePDFMaker
forOffice object that is exposed to VBA but I can't find any documentation
and so I don't know how to call the pdfmaker from VBA.

Can anyone point me in the right direction (or tell me that it can't be done)?

thanks in anticipation.
 
S

StevenM

To: Alistair F,

I know this works for Word 2007, I'm unsure about 2003:

Dim oDoc as Document
Dim sFilename as String

oDoc.ExportAsFixedFormat _
OutputFileName:=sFilename, _
ExportFormat:=wdExportFormatPDF, _
BitmapMissingFonts:=True, _
UseISO19005_1:=True

Steven Craig Miller
 
G

Gordon Bentley-Mix

Alistair,

As far as I can tell from searching the MSFT site, Word 2003 doesn't support
the creation of PDF files natively (altho Word 2007 does - albeit with some
limitations). Therefore, I suspect that the functionality you are accessing
through the 'Create PDF' menu item is being provided by a third-party
application of some sort - Adobe PDF Maker, by the looks of your subject
line. If this is the case, then it is doubtful that you will be able to
easily drive this directly through VBA. At best, you may be able to "print"
the document to PDF, as Word may see Adobe PDF as a printer.

If, as you say, there is an AdobePDFMakerforOffice object that is exposed to
VBA, then perhaps you would be better off contacting Adobe for information on
how to use it. It's not a MSFT product, so you would need to strike it lucky
to find someone in this forum with the knowledge you require.
--
Cheers!
Gordon

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 
G

Graham Mayor

That would only work with 2007 and then only if the Microsoft PDF add-in was
installed. It doesn't use Acrobat.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

You can certainly print to the Acrobat driver using vba (examples of how to
do that at http://www.gmayor.com/fax_from_word.htm ) but it should be
possible to access the PDFMaker object, if only we knew what the syntax is
and Adobe has always been somewhat reticent about allowing access to its
add-in code ( I seem to recall a court action against someone who reverse
engineered some of Adobe's code).

Certainly Adobe used to use macros in a *.dot add-in up to version 6, which
it changed to a COM add-in in Version7. I think your best bet, if simply
printing to the Adobe driver doesn't cut it, would be to scour the Acrobat
forums and Google for insights - a start point could be
http://diaryproducts.net/for/programmer/adobe_acrobat_pdf_scripting_visualbasic_javascript

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
A

Alistair F

Thanks for this, it gives me a good starting point. I've found that accessing
the pdfMaker directly gives some additional options for the final pdf that I
can't seem to get by printing to it so I'll look a bit more before trying the
print option.

Thanks again to all
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top