Printing/Outputing to PDF File

M

MJ

Using: AC2003 & Adobe Acrobat Pro

I have come up with a way to print report(s) by setting the Print Object
default for each desired output Report to PDF Printer and using:

DoCmd.OpenReport "MyReport", acViewNormal

This accomplishes the desired results with user interface REQUIRED to select
where and what file name.

While this works, it is NOT what I would really like it to happen. Is the a
way that I can do it such that I can code the location and the file name?
Is there was a way to use:

DoCmd.OutputTo acOutputReport, "MyReport", acFormatPDF, "location and
filename"

When I have tried it, the "acFormatPDF" errors off, any ideas or suggestions?

Thank you in advance,
 
M

Mark Andrews

In older versions of Adobe PDFWriter 5.x and lower you could control it
through the registry and supply the filename and suppress the dialogs.
Newer versions
are more difficult to deal with. Most people either use the PDF routine at
http://www.lebans.com/reporttopdf.htm or control the registry
settings and use a PDF printer driver of their choice. I like win2pdf.
There are a bunch of PDF printer drivers.

I have samples of registry controlling code in the Email module at
www.rptsoftware.com
also you can get help at win2pdf.com. Note the email module also has
routines to do batch reporting (example: creating pdf files for 500
customers) where
at runtime sometimes you need a simple where clause, sometimes you need
something trickier like completely new sql for the query(s) that drive the
report.
I have been using it for years in a product which serves up pdf files to the
web.

HTH,
Mark
RPT Software
http://www.rptsoftware.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