Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving report as PDF using VBA

Status
Not open for further replies.

paradia

Technical User
Jun 29, 2004
13
0
0
CA
I have the code to save the report as a PDF, however I would like to add a couple features and I don't know how.

The code I've got is old and I think Acrobat has changed some things. Right now I'm changing the win.ini file in an attempt to 1. Save the file under a specific name 2. Stop the file from opening automatically in Acrobat and 3. Get rid of the need "Save-As" pop-up.

The code I'm using changes the win.ini using and API and the following line:
Call aht_apiWriteProfileString("Acrobat PDFWriter", _
"PDFFileName", NewFileName)
So basically it is supposed to change some settings that Acrobat uses. However, I think that Acrobat has been changed and no longer looks to the Win.ini under the [Acrobat PDFWriter] section for information.

Can anyone tell me what I need to do in order to have my report automatically saved under whatever name I choose without opening the "Save-As" screen or opening Acrobat after it has been saved?

Thanks for your help!!!
 
If you are interested I have some code that I got from another forum. It uses GhostScript a free PDF generator. The code I have will satisfy both your requirements.

If anyone is interest I will ask if I can post the code in this forum too.

 
Hi

Later versions of Acrobat are possibly using Registry settings to achive what was formerly done via Win.INI

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Hi Mych

Can you give details of the GhostScript free PDF generator?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top