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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate Save As

Status
Not open for further replies.

clapper62

Programmer
Apr 17, 2003
113
US
I'm trying to automate the creation of a report called TimeSheet this code does create the pdf file as desired but
it requires input from the user because the Save As dialog box pops up. Is there anyway to tell the Save As dialog box the file name and location to save through code?

Dim NewPrinter
Dim prtDefault

Set prtDefault = Application.Printer
NewPrinter = "PDF Writer"
Set Application.Printer = Application.Printers(NewPrinter)

stDocName = "TimeSheet"
DoCmd.OpenReport stDocName, acViewNormal

Set Application.Printer = prtDefault

"There is no pleasure in having nothing to do; the fun is having lots to do and not doing it.
." - Andrew Jackson
 


hi,

MS Access questions are best answered in MS Access forums like forum705.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top