Kat,
Assign it to the Acrobat Distiller printer. If you do this, there is a default Distiller option:
"File|Preferences|View Pdf<something>, which you will probably want to turn off in order to keep it from popping up every time you create a pdf report.
It's only valid if you have version 5 (or later I think) of the DocuCom PDF Driver, but basically it works in 3 stages.
Stage 1: Sets up general settings ready to accept automated prints:
Sub PDFSettings()
Dim Sh
Dim key
Set Sh = CreateObject("WScript.Shell"
key = "HKEY_CURRENT_USER\"
Sh.RegWrite key & "Software\Zeon\DocuCom\PDF Driver\General\", ""
Sh.RegWrite key & "Software\Zeon\DocuCom\PDF Driver\General\bMSOFFICE", "1", "REG_SZ"
Sh.RegWrite key & "Software\Zeon\DocuCom\PDF Driver\General\WebViewing", "1", "REG_SZ"
Sh.RegWrite key & "Software\Zeon\DocuCom\PDF Driver\General\StandardPage", "3", "REG_SZ"
Sh.RegWrite key & "Software\Zeon\DocuCom\PDF Driver\General\bViewPDF", "0", "REG_SZ"
End Sub
then for each printout you want to specify the filename for:
Private Sub ChangePDFName(strFileName )
Dim Sh
Dim key
Set Sh = CreateObject("WScript.Shell"
key = "HKEY_CURRENT_USER\Software\Zeon\DocuCom\PDF DRIVER\Destination\"
Sh.RegWrite key & "PDFName", strFileName, "REG_SZ"
Sh.RegWrite key & "NamingMode", "1", "REG_SZ"
Sh.RegWrite key & "FileExistRule", "1", "REG_SZ"
End Sub
and finally reset everything for the next time you print:
Sub ResetPDFSettings()
Dim Sh
Dim key
Set Sh = CreateObject("WScript.Shell"
Sh.RegDelete "HKEY_CURRENT_USER\Software\zeon\docucom\pdf driver\Destination\"
Sh.RegDelete "HKEY_CURRENT_USER\Software\zeon\docucom\pdf driver\General\"
End Sub
so your code will look like:
Application.ActivePrinter = "DocuCom PDF Driver on LPT1:"
Call PDFSettings()
ChangePDFName("C:\report1.pdf"
Docmd.openReport "Report1"
ChangePDFName("C:\report2.pdf"
Docmd.openReport "Report2"
ChangePDFName("C:\report3.pdf"
Docmd.openReport "Report3"
Call ResetPDFSettings()
and so on.
All the registry settings come from the SDK pdf I downloaded from the Zeon website.
hth
Ben
----------------------------------------------
Ben O'Hara
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.