Application Printer still prints to default

G

Guest

OutPutReportFileWtHi I am using the code below in Access 2002
The printer object does correctly print to the Win2PDF printer but
also prints to the default printer. I only want the report to print out
to the file name and not the default printer also. Is this because I have
the default printer also set and the report is set to use the default printer
Any help would be appreciated




Set Application.Printer = Application.Printers("Win2PDF")
SaveSetting "Dane Prairie Systems", "Win2PDF", "PDFFileName",
OutPutReportFileWt
DoCmd.OpenReport RptName, acViewNormal, , StrCritera
Set Application.Printer = Nothing
 
C

Craig Lebakken

canusehelp said:
OutPutReportFileWtHi I am using the code below in Access 2002
The printer object does correctly print to the Win2PDF printer but
also prints to the default printer. I only want the report to print out
to the file name and not the default printer also. Is this because I have
the default printer also set and the report is set to use the default printer
Any help would be appreciated

If you previously used the "Print PDF" option when interactively
creating a PDF file, the setting will continue to be used when using
VBA to control Win2PDF. If you manually create another PDF file from
any Windows application and uncheck the "Print PDF" option, the next
time you create a report it shouldn't be sent to the paper printer.

Alternatively, you can force the "Print PDF" option to be disabled by
setting a value named "file options" in the registry to 0. More
information and example code is at the following page:
http://www.win2pdf.com/doc/usingtheprinterobject.htm

Craig
 

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

Similar Threads


Top