Hi,
I'm using Access 2007 and can use VBA to open a report, no problem.
However, I need these reports to be printed as pdf files.
At the moment:
1) The pdf's filename is copied to the clipboard
2) VBA opens the report in preview mode
3) The user presses ctrl+P > Enter to print
4) The user is prompted for the pdf filename, and presses ctrl+V to paste it
Is there a way I can just create the pdf without any user interaction?
Thanks,
Andy
Last edited by ambitw; 01-16-2012 at 04:20 AM.
ambitw,
From Access I use this daily to dump all my production reports to a shared drive.
"rptHandout" - is the name of the report I created.
acFormatPDF tells it to do a pdf
and then the next arguement is where you want to put it.
You can put this in line with any other automation you have.
So today I would have a report at C:\myPath\myfile011012.pdfDoCmd.OutputTo acOutputReport, "rptHandout", acFormatPDF, "C:\myPath\myfile" & Format(Date, "mmddyy") & ".pdf"
Thanks Bmoe!
That was perfect!
Andy
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks