Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

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
0
greggranger41
Asked:
greggranger41
  • 2
1 Solution
 
adraughnCommented:
I just had the same issue with 7.0 - I used Lebans code. I can't copy it to ee because of copyright, but I can give you the link to his site and if you need help with troubleshooting I can help.

adria

http://www.lebans.com/reporttopdf.htm
0
 
greggranger41Author Commented:
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?
0
 
adraughnCommented:
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
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now