print to pdf-number of pages

K

ken

i have ~100 reports which i need to print to pdfs. all reports should be two
pages. sometime three pages get printed due to errors or other reasons. i
send the reports to a pdf via docmd.outputto pdf. i would like to track for
each report, the total number of pages sent for each report. how can i do
this.
 
A

Alex Dybenko

Hi,
you can open report in preview, but hidden, before printing to PDF and get
it number of pages using Pages property:

docmd.OpenReport strReport,acViewPreview,,,acHidden
debug.print reports(strReport).Pages
docmd.close acReport, strReport

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top