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

A different Twist on PDF from Access Report

Status
Not open for further replies.

blackbri

Technical User
Jun 10, 2002
6
0
0
US
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
 
Not sure how pdf995 works, but it sounds like you need to swap your docmd.openreport and sendkeys lines... You want to open the report and then send text to some dialog that pops up, right?

A reference to the thread and url of the pdf995 may help. I'm a little curious about the product as I currently email snapshot reports instead of pdf's.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top