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

Posted on 2007-08-09
Last Modified: 2013-11-28
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,

Question by:greggranger41
    LVL 13

    Accepted Solution

    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.


    Author Comment

    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?
    LVL 13

    Expert Comment

    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,

    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Have you ever come up with a need of emailing only few pages of PDF file to one of yourfriend or colleague, instead of whole Adobe file? If yes, then surely you have face problems in doing that! Read this section as I have suggested multiple solutio…
    *Adobe Acrobat 9 was used for this article.  Particular steps may vary depending on software versions. Adobe Acrobat has many, many variables that my be utilized to customize your forms for clarity and ease of use. The Form Editing Tool will be y…
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now