Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2005

Tip: Looking for answers? Try searching our database.

Print Directly To PDF

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ben - 18 Aug 2005 08:24 GMT
What line of code would I use in word to print a document directly to a PDF
without getting in information form the user. The variables that I would want
to set in code would be:
For the PDF to be saved in the same location as the original document.
I want to set the name of the PDF in code

The name of my PDF printer is: "Adobe PDF"

I just want to put a button on a word document that prints the current to a
PDF storing it in the same location as the original document and with a file
name that I set in code.

Thankyou in advance for your help.
Jezebel - 18 Aug 2005 08:45 GMT
If you're using Acrobat 6 --

1. Add a reference to AdobePDFMaker to your VBA project.

2. Use the instruction: AdobePDFMaker.ConvertToGelatoPDF

The PDF will have the same name as the Word document, and be put in the same
folder. You can then rename it as you need. To make sure you get no prompts
from Acrobat, a) Make sure the Word document is saved, and b) check that
there is no existing PDF file that will get overwritten.

> What line of code would I use in word to print a document directly to a
> PDF
[quoted text clipped - 13 lines]
>
> Thankyou in advance for your help.
David C. Holley - 18 Aug 2005 14:40 GMT
Where can I find more documentation on the AdobePDFMaker object with its
properties & methods?

> If you're using Acrobat 6 --
>
[quoted text clipped - 24 lines]
>>
>>Thankyou in advance for your help.
Jezebel - 19 Aug 2005 14:06 GMT
There's no free source of documentation that I know of. You can see the
methods of the object by using Tools > Macros and selecting PDFMaker from
the 'Macros in' dialog. Then experiment :)

Earlier versions of Acrobat had an SDK that you could download for free.
That provided some documentation, some of which is still relevant. But with
Acrobat 6 the SDK is no longer free, and I'm too stingy to pay for it. And
in any case, they're now up to version 7, which is a different kettle of
fish entirely.

> Where can I find more documentation on the AdobePDFMaker object with its
> properties & methods?
[quoted text clipped - 27 lines]
>>>
>>>Thankyou in advance for your help.
David C. Holley - 19 Aug 2005 22:32 GMT
Just curious becase the question came up a bit ago in the Access
newsgroup and the responses (including mine) dealt with printing to the
designated PDF printer.

> There's no free source of documentation that I know of. You can see the
> methods of the object by using Tools > Macros and selecting PDFMaker from
[quoted text clipped - 37 lines]
>>>>
>>>>Thankyou in advance for your help.
Ben - 19 Aug 2005 02:08 GMT
I tried that but it still pops up with the save as dialog for the pdf. I did
exactly what you said added the reference and then used the line:
       AdobePDFMaker.ConvertToGelatoPDF

Before I was using the below:  

     ActivePrinter = "Adobe PDF"
       Application.PrintOut

this essentially does the same as you suggested but it does not require the
reference. I just need to be able to convert it to pdf without any use
interaction whilst giving it a name and setting the location for it to
stored. It storing it in the same location as the original document and using
the same name would do fine.

Thank you again.

> If you're using Acrobat 6 --
>
[quoted text clipped - 24 lines]
> >
> > Thankyou in advance for your help.
Jezebel - 19 Aug 2005 14:03 GMT
You'll get a prompt if the word document has never been saved -- apart from
that, don't know. The method works for me. But it's all undocumented, so
anybody's guess.

>I tried that but it still pops up with the save as dialog for the pdf. I
>did
[quoted text clipped - 48 lines]
>> >
>> > Thankyou in advance for your help.
Ben - 30 Aug 2005 05:59 GMT
Now that I have create the doucment that I wanted to and I have started to
let other people use it. I am now finding that some people machines can not
find the referance to: AdobePDFMaker

They have the excat same version and installation of Adobe Acrobat Distiller
6.0. When I go in to add the referance on their computer the AdobePDFMaker
does not come up on the list. How can I force the computer to find the
referance? DO you know where it is located on the C drive so I can add it
manually?

They all seem to have: AdobePDFMakerX but I cannot get the same functions to
work.

Thankyou in advance for your help.

> You'll get a prompt if the word document has never been saved -- apart from
> that, don't know. The method works for me. But it's all undocumented, so
[quoted text clipped - 52 lines]
> >> >
> >> > Thankyou in advance for your help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.