I am using Access 2007 and the following code to generate and save a PDF. The PDF is automatically saved in the Sales folder but is there an easy way to open the "file save as"/ Explorer window (sorry not sure what it is called) prepopulated with the me.SaveAs as the file name so that the user can navigate to a different folder if required?
Code:
Private Sub btnSavePDF_Click()
On Error GoTo ErrorCode
Dim MyReportName As String
MyReportName = Me.txtReport.Value
DoCmd.OutputTo acOutputReport, MyReportName, "PDF Format (*.pdf)", "" _
& "x:\Sales\" & Me.SaveAs & ".pdf", True
Exit Sub
ErrorCode:
If Err = 2501 Then Exit Sub 'ignore error if user cancels print
Beep
MsgBox Err.Description
End Sub