Using Acrobat menu from vba; Acrobat menu not available in Word.

M

Mike

Hi! Sorry for the second repost - my 1st one did not get any responses.

Here's my problem: when I programmatically convert Word documents to
PDF via Print to PDF driver, the resulting PDF does not contain embedded links
found in original Word documents. I figured if I find a way to execute
“Adobe PDF†-> “Convert to Adobe PDF†option of Acrobat Add-in, I can solve
the problem of missing links.

When I open the document manually, I can see the “Adobe PDF†option on the
menu bar. When I open the document programmatically, the menubar does not
contain “Adobe PDF†option. As a result, my code can not execute.

I also tried to execute the macros directly from my C# WinForm application
but was getting Unable to Execute Macro exception which I am sure is related
to the aforementioned problem.

Application.Run MacroName:="AdobePDFMakerA.AutoExec.Main"
Application.Run MacroName:="AdobePDFMakerA.AutoExec.ConvertToPDF"



Here’s how I open Word documents in code:

private Word.ApplicationClass wordApp = null;

.. . . . . .

doc = wordApp.Documents.Open(
ref objOrgDoc, //FileName
ref objMissing, //ConfirmVersions
ref objMissing, //ReadOnly
ref objMissing, //AddToRecentFiles
ref objMissing, //PasswordDocument
ref objMissing, //PasswordTemplate
ref objMissing, //Revert
ref objMissing, //WritePasswordDocument
ref objMissing, //WritePasswordTemplate
ref objMissing, //Format
ref objMissing, //Enconding
ref objMissing, //Visible
ref objMissing, //OpenAndRepair
ref objMissing, //DocumentDirection
ref objMissing, //NoEncodingDialog
ref objMissing //XMLTransform
);



What can I do to execute the menu option programmatically? What am I doing
wrong?
Is there a way to force Adobe to “show up�

Word 2003, Acrobat 6 & 7

Many thanks in advance,

--Michael
 
J

Jonathan West

Hi Mike,


Some things to check

1. See if an Add-in called "PDFMaker.dot" is a member of the Addins
collection, and that its Installed property is true. if that is not so, then
the macros of the addin are not available

2. Try changing the command to Application.Run "ConvertToPDF"

Unless there is more than one ConvertToPDF macro loaded, it should work
perfectly well.

3. Do you have the full commercial version of Acrobat installed, or just the
free Reader?


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 

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