Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Report to be saved to PDF?

Status
Not open for further replies.

KarloZ

Programmer
Dec 15, 2001
65
0
0
CA
hello guys,
wondering if anyone has a code for exporting or printing an Access report into a PDF file. i manage to use the Adobe Distiller to do the job but i have to select the Distiller as the printer everytime i'm creating the file. i want it something more automated taht would select the Distiller as the printer by itself. i cannot find a parameter or a command that would support it. thanks guys.

karloz
 
Open your report in design view and go to File. Click on page setup and select the Page tab. Select use specific printer and select Adobe distiller. This should set your printer to print pdf by default.
 
i've tried your suggestion before natatbh but it did not work. somehow i have to think of a code that will get the list of all printers installed and set the default to the distiller and after creating the pdf restores the default printer to the original one. someone could help that would be great. thanks for your reply.

karloz
 
KarloZ, What version of access are you using? If you are using 2002 I think I can help. Prior versions, getting printer information is beyond my capability. Alternatively, you can go buy the book "Access Cookbook" by "O'Reilly publishing. This book is worth it's weight in gold for Access (all versions). If your 2002, I'll outline what the book says to do for ya, but it says prior versions doing this is very difficult.....

~Orden
 
I don't know why my idea didn't work but here you go anyway.

I hope this gets you going,

Dim prtLoop As Printer

For Each prtLoop In Application.Printers
With prtLoop
MsgBox "Device name: " & .DeviceName & vbCr _
& "Driver name: " & .DriverName & vbCr _
& "Port: " & .Port
End With
Next prtLoop
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top