Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving a pdf automatically 1

Status
Not open for further replies.

Razor1

IS-IT--Management
Nov 21, 2002
81
US
I have a program that creates a pdf from a report. Acrobat PDF opens a dialog box to save the PDF. I need a way to have the PDF document saved to a specific location and a specfic name without intervention from the end user.

Any help would be greatly appreciated.



Razor1
 
What version of access? If in 2007 it is very simple

Public Sub saveReport(rptName As String)
Const path = "C:\"
DoCmd.OutputTo acOutputReport, rptName, acFormatPDF, path & rptName & ".pdf"

End Sub

Public Sub testrpt()
saveReport "rpt1"
End Sub

 
I am using Access 2003.

Razor1
 
OK, I think you need the lebans file.
 
Thanks. That stops the dialog box. How do I stop adobe from opening up. I do not need to see the report. I just need to save it in a folder which the code does.


Razor1
 
It is up to the PDF Writer software's configuration whether a pdf file is opened by the default reader right after the file has been created.
 
Thanks for the help.

The opening of adobe after the creation is in the printer settings under Adobe PDF Settings. Uncheck View Adobe PDF Results. To change the saving of the file with out being prompted you can select Adobe PDF Output Folder.

THis solution works in QAdobe Version 9. I don't know about other versions.

Razor1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top