Many thanks for the coding provided in an earlier thread to be able to snapshot document, save as pdf and email it.
Unfort I have done everything as instructed and am still having problems.
Getting a "ByRef argument type mismatch" error on this line (highlighting Report):
blRet = ConvertReportTo PDF(Report, vbNullString, fileName, False, True, 1, "", "", 0, 0)
The name of my report is rptInvoice and I created the folders to put the PDF into.
I changed the Report to View Report got a syntax error. Changed the report name to ReturnsForm as you had it, get byRef error again :(
Where am I going wrong?
Unfort I have done everything as instructed and am still having problems.
Code:
*******************
Private Sub View_Report_Click()
Dim blRet As Boolean
Dim fileName, Report, msg1 As String
Report = "rptInvoice"
fileName = "C:\Invoices\PDF Files" & Replace(Date, "/", "") & ".pdf"
DoCmd.OpenReport Report, acViewPreview
blRet = ConvertReportToPDF(Report, vbNullString, fileName, False, True, 1, "", "", 0, 0)
DoCmd.Close acReport, Report
sbSendreturnform fileName
End Sub
*********************
blRet = ConvertReportTo PDF(Report, vbNullString, fileName, False, True, 1, "", "", 0, 0)
The name of my report is rptInvoice and I created the folders to put the PDF into.
I changed the Report to View Report got a syntax error. Changed the report name to ReturnsForm as you had it, get byRef error again :(
Where am I going wrong?
Comment