I'm using Microsoft Access. I've got some code that will take an Access report and using PDF995 will create a PDF. What I'm wanting to do is bypass the PDF995 Save As popup box and either:
1) Save the file as the default name and default locations (I can rename the file and location through VBA afterwards) or
2) Specify the location and file name through VBA.
Again, the goal is to bypass the end user having to specify the name and location.
What I'm doing is creating a PDF that will be automatically attached in an email. So I don't want the end user establishing the name or file path.
Code for creating PDF995 file in Access:
Private Sub Click_Click()
Set Application.Printer = Application.Printers("PDF995")
DoCmd.OpenReport "ReportName", acViewNormal
Application.Printer = Nothing
End Sub
1) Save the file as the default name and default locations (I can rename the file and location through VBA afterwards) or
2) Specify the location and file name through VBA.
Again, the goal is to bypass the end user having to specify the name and location.
What I'm doing is creating a PDF that will be automatically attached in an email. So I don't want the end user establishing the name or file path.
Code for creating PDF995 file in Access:
Private Sub Click_Click()
Set Application.Printer = Application.Printers("PDF995")
DoCmd.OpenReport "ReportName", acViewNormal
Application.Printer = Nothing
End Sub