Link to home
Start Free TrialLog in
Avatar of greggranger41
greggranger41

asked on

Adjust Registry file name when producing .pdf files from Access 2003, using Adobe 8.0

About a year ago, I designed some code to print .pdf reports in Access 2003 using PDF Writer (Adobe Acrobat version 5.0). The code would print multiple .pdf files, based on an Access report, and save them to a specific location with a specific name that I specify within the VB code.

Unfortunately, after upgrading to Adobe Acrobat 8.0, the functionality no longer works.

After reviewing the code, I determined how to get the file to print to a .pdf file using using Adobe 8.0, but am having trouble updating the registry to specify the file name. When I execute the functionality in Access, the file will be created, but I'm immediately prompted for a file name.

I'm using the following VB code to update the desired .pdf file name in the Windows Registry although its not currently working:

bSetRegValue HKEY_CURRENT_USER, "Software\ADOBE\Acrobat\PDFMaker\8.0\Global\Settings", "PDFFileName", sPDFPath + sPDFName

The sPDFPath and sPDFName values are the variable that makes up the proposed file name.

So my question is "Using Adobe 8.0, is it possible to update a WIndows Registry setting, so a .pdf file is automatically created using that name?"

If that is not possible, does anyone know of a vendor who sales versions of Adobe 5.0, so I revert to old code which worked like a charm?

Thanks in advance,

Greg
ASKER CERTIFIED SOLUTION
Avatar of adraughn
adraughn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of greggranger41
greggranger41

ASKER

Thanks Adria; I will investigate your solution and will most likely request your help, as you so graciously offered.

How difficult is the solution to adapt?
It's not difficult. You need to change your Acrobat printing preferences, copy a few of the downloaded files over to your local sys files, add a new mod to your db (that you donwload) and create a form to run the code from.

I'm not sure what you are using it for, but I had to loop thru historical records to check the status of the record and create a PDF for all closed records - which was 10k records. If you need help with a loop, let us know.

It worked great for me, except that it would crash after 150 pdf's were created (i'm assuming this is a memory issue). But I solved it by running the records in batches of 150. Worked fine.

good luck,


a
Forced accept.

Computer101
EE Admin