I have read the FAQ and many other posts on saving a report to PDF, but most are based on using Adobe Writer. I am using pdf995 as my method of saving the reports.
I did find one post that referred to this but it is years old so I decided to start new.
I am able to print the report and get the "PDF Save As" box, but am unable to fill in the filename. I have tried multiple variations of SendKeys statements but nothing is filling in the file name line. Can anyone please help me with this?
I am sure that I am missing something very simple, I am sure.
The following is my current code, based on clicking a button on a form.
Private Sub EmailButton_Click()
On Error GoTo Err_EmailButton_Click
Dim stDocName As String
Dim strReportPDFName As String
Dim strWindowTitle As String
stDocName = "Headlines"
strReportPDFName = "TestHeadlinePDF"
SendKeys strReportPDFName & "{ENTER}", False
DoCmd.OpenReport stDocName, acPreview
Exit_EmailButton_Click:
Exit Sub
Err_EmailButton_Click:
MsgBox Err.Description
Resume Exit_EmailButton_Click
End Sub
I did find one post that referred to this but it is years old so I decided to start new.
I am able to print the report and get the "PDF Save As" box, but am unable to fill in the filename. I have tried multiple variations of SendKeys statements but nothing is filling in the file name line. Can anyone please help me with this?
I am sure that I am missing something very simple, I am sure.
The following is my current code, based on clicking a button on a form.
Private Sub EmailButton_Click()
On Error GoTo Err_EmailButton_Click
Dim stDocName As String
Dim strReportPDFName As String
Dim strWindowTitle As String
stDocName = "Headlines"
strReportPDFName = "TestHeadlinePDF"
SendKeys strReportPDFName & "{ENTER}", False
DoCmd.OpenReport stDocName, acPreview
Exit_EmailButton_Click:
Exit Sub
Err_EmailButton_Click:
MsgBox Err.Description
Resume Exit_EmailButton_Click
End Sub