Hi All,
I'm using A2003 and using Lebans excellent code I have managed to get as far as creating a pdf from a report and emailing it, but I am trying to give each one a unique name based on a field in the report
This is my current code
I have tried variations like this
but that just gives me a filename of IssueId = Forms!Issues!ID how do I make it give me the actual Id to save it then be able to add to the sendmessage code?
I'm using A2003 and using Lebans excellent code I have managed to get as far as creating a pdf from a report and emailing it, but I am trying to give each one a unique name based on a field in the report
This is my current code
Code:
Dim strFilter As String
strDocName = "Issue"
strFilter = "Id = Forms!Issues!ID"
DoCmd.OpenReport strDocName, acPreview, , strFilter
Dim blRet As Boolean
blRet = ConvertReportToPDF("Issue", , "T:\Issues\Issue" & ".pdf", False, False)
SendMessage True, "T:\Issues\Issue.pdf"
DoCmd.Close acReport, "Issue"
I have tried variations like this
Code:
blRet = ConvertReportToPDF("Issue", , "T:\Issues\Issue" & strFilter & ".pdf", False, False)
SendMessage True, "T:\Issues\Issue[strFilter].pdf"
DoCmd.Close acReport, "Issue"
but that just gives me a filename of IssueId = Forms!Issues!ID how do I make it give me the actual Id to save it then be able to add to the sendmessage code?