Print Access Report as PDF with Acrobat 6

T

Tony_VBACoder

Since upgrading from Acrobat 5 to Acrobat 6, my code that
I used to use to print an Access 2000 Report as a PDF
using the "PDFWriter" printer, which now with Version 6 of
Acrobat does not exist, no longer works. With Acrobat
Version 5, my sample code is (minus any functions that
browse for folders and read/write to the Windows Registry):

1) Ask the user where they would like to store the reports:
sFolderName = BrowseFolder("Select a Folder to Export the
PDF Report to:", sCurrentDBPath)

2) Build the PDF File Path:
sFileAttachment = sFolderName & "\" & sPDFFileName & ".pdf"

3) Read the current default printer and save the value -
we will need this later when we reset the Default Printer
sMyDefPrinter = dhReadRegistry
(HKEY_CURRENT_USER, "Software\Microsoft\Windows
NT\CurrentVersion\Windows", "Device")

4) Change the default printer to the PDF Writer:
dhWriteRegistry
(HKEY_CURRENT_USER, "Software\Microsoft\Windows
NT\CurrentVersion\Windows", "Device", "Acrobat PDFWriter")

5) Set the value for PDFFileName in the registry Prints
the Report without the dialog box from appearing:
dhWriteRegistry(HKEY_CURRENT_USER, "Software\Adobe\Acrobat
PDFWriter", "PDFFileName", sFileAttachment)

6) Open the Report so it will print it:
DoCmd.OpenReport sReportName, acViewNormal

7) Change the Printer from PDF Writer back to the default
printer:
dhWriteRegistry
HKEY_CURRENT_USER, "Software\Microsoft\Windows
NT\CurrentVersion\Windows", "Device", sMyDefPrinter


Now, with Acrobat Version 6, the "PDFWriter" printer has
gone away, along with the Windows Registry entries, and
now it appears that I must first print my Access Report as
a PostScript format (*.ps) and then use the Distiller
printer to convert (print) it to a PDF.

If anyone has any sample code that shows me how to do
this, it would be much appreciated as I am in a time
crunch to convert what used to work under 5.0 to 6.0.

Thanks.
 
S

SA

Tony:

You are correct that PDFWriter is not in Acrobat 6 and that there are no
registry entries to control the Adobe PDF printer. You can do a couple of
things:

1.) Reinstall just the PDFWriter printer from Acrobat 5, it does co-exist
well with Acrobat 6 (don't install any of the other parts of Acro 5)
2.) Check out our PDF and Mail Library that does support Acrobat 6
3.) Look at a few alternate print drivers such as PDF-XChange, Win2PDF etc.
that are more light weight PDF creators and operate more like PDFWriter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top