Printing a PDF document from Access (1 Viewer)

Little_Man22

Registered User.
Local time
Today, 22:33
Joined
Jun 23, 2001
Messages
118
Hi,

Right now I have the following code in a module (which is called through the on_click event procedure of a button on a form):

strPdfFile = "p:\tpg\forms\generic.pdf" 'Existing PDF form file
strFdfFile = "p:\tpg\forms\" & strCompany & "App.fdf" 'FDF file to create

[some code ommited for berevity]

.FDFSetFile strPdfFile 'Associate FDF file with PDF file"

.FDFSaveToFile strFdfFile 'Create the FDF file on disk

.FDFClose 'Close Output file

End With

'Launch Acrobat viewer (Reader or Exchange) with the FDF file.
hDC1 = GetDesktopWindow() 'Get a window handle for ShellExecute's purposes.

lVal = ShellExecute(hDC1, "Open", strFdfFile, "", "Path", 1)
Exit Function

This code will open a PDF form and pupulate various fields on it. How can I manipulate the code to have to PDF form, rather then displaying on the users screen, simply print on the office printer? i.e. instead of launching Acrobat Reader I want the document to print...is this possible?

Thank in advance,
-rjd.
 

Users who are viewing this thread

Top Bottom