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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Reports Can I automatically Print To PDF files?

Status
Not open for further replies.

kjenkinz

Technical User
Jan 24, 2003
16
US
Is it possible to print my access reports to a (or multiple) PDF files rather than printing them one at a time? I would LOVE to have code that does that!
 
kj:

I have a setup that allows me to print to PDF but it is has a pop-up box so it is not 100% automated.

The report is setup to have Printer Name as "Adobe PDFWriter".

The VBA is:

'open form in preview
DoCmd.OpenReport DocName, A_PREVIEW
'save report to PDF file
Reports(DocName).Caption = sDocName
DoCmd.PrintOut
DoCmd.Close acReport, DocName

Where DocName is the name of the report
sDocName is the save as PDF file name

You can put a loop and re-assign the DocName and sDocName to print out all the reports in your list.

The only problem is when the DoCmd.PrintOut line is executed, a windows confirmation screen pops up and you have to confirm "save" to continue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top