Access Report Save as PDF using microsoft Addin

G

green00guy

Hello,

I am trying to batch output reports to a directory using the SaveAs PDF
function(not Adobe's print method). I have tried the DoCmd.OutputTo
acOutputReport method, and it appears to be designed to work with adobe. Can
someone point me in the right direction to make it work with SAVEAS?

Thanks
 
T

Tony Toews [MVP]

green00guy said:
I am trying to batch output reports to a directory using the SaveAs PDF
function(not Adobe's print method). I have tried the DoCmd.OutputTo
acOutputReport method, and it appears to be designed to work with adobe. Can
someone point me in the right direction to make it work with SAVEAS?

What version of Access? If A2007 SP2 and newer it's built in. If
older then you need the Lebans free DLLs.

A2000ReportToPDF is an Access 2000 database containing a function to
convert Reports and Snapshot files to PDF documents. No PDF Printer
driver is required. Free.
http://www.lebans.com/reporttopdf.htm

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
 
G

green00guy

I am using 2007.

I added the microsoft addin for PDF's I am looking for the VB to tell it to
batch my reports to a directory.

Thanks
 
A

Albert D. Kallal

green00guy said:
I am using 2007.

I added the microsoft addin for PDF's I am looking for the VB to tell it
to
batch my reports to a directory.

The code is:

Dim strReport As String

strReport = "contacts2"
DoCmd.OpenReport strReport, acViewPreview, , , acHidden
DoCmd.OutputTo acOutputReport, strReport, acFormatPDF, "c:\1.pdf"
DoCmd.Close acReport, strReport

Note that if you have any filters, or "where" clauses, you place them in the
openReport command...

Note above you have to close the report when done...
 
M

Mike

Hi,

I'm having similar issues. I'm using Microsoft Access 2007 SP1 (which I
realize is a SP behind), but I think I still have a relevant question here.

My specific issue is this: given the below code snippet, when I attempt to
use the "OutputTO" member of the DoCmd property, I'm told by Visual Studio
2005 that:

'OutputTo' is ambiguous because multiple kinds of members with this name
exist in interface Microsoft.Office.Interop.Access.DoCmd

How do I get around that?
 

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