A
AJ
I have just written a VBA script (below) that successfully prints a single
record to pre-defined report, then uses SendObject to load it onto an E-mail
(and inserts the E-mail address, etc ). Not bad for a newbie.
But the report has some formatting that makes it difficult to use HTML, RTF,
etc. so I am currently using the Snapshot format, for the report. But what I
see is that not everyone can read that, who I might send it to. I think you
need MS Access loaded to read that format.
What about PDF?
I have Acrobat 4.0 and also the open source PDF Creator on my machine. How
can I make the SendObject code print the report in PDF format, and attach
THAT? (Any code critiqing would also be welcome)
Existing code:
Private Sub cmdSend_Click()
Dim strDocName As String
Dim strWhere As String
Dim strEmail As String
Dim strSubject As String
Dim strStudent As String
strDocName = "rptStudentRegConf"
strWhere = "[ID]=" & Me!ID
strEmail = Me!ParentEmail
strSubject = Me!FirstName & "'s Registration Confirmation"
DoCmd.OpenReport strDocName, acPreview, , strWhere
DoCmd.SendObject acSendReport, strDocName, acFormatSNP, strEmail, , ,
strSubject, , True
record to pre-defined report, then uses SendObject to load it onto an E-mail
(and inserts the E-mail address, etc ). Not bad for a newbie.
But the report has some formatting that makes it difficult to use HTML, RTF,
etc. so I am currently using the Snapshot format, for the report. But what I
see is that not everyone can read that, who I might send it to. I think you
need MS Access loaded to read that format.
What about PDF?
I have Acrobat 4.0 and also the open source PDF Creator on my machine. How
can I make the SendObject code print the report in PDF format, and attach
THAT? (Any code critiqing would also be welcome)
Existing code:
Private Sub cmdSend_Click()
Dim strDocName As String
Dim strWhere As String
Dim strEmail As String
Dim strSubject As String
Dim strStudent As String
strDocName = "rptStudentRegConf"
strWhere = "[ID]=" & Me!ID
strEmail = Me!ParentEmail
strSubject = Me!FirstName & "'s Registration Confirmation"
DoCmd.OpenReport strDocName, acPreview, , strWhere
DoCmd.SendObject acSendReport, strDocName, acFormatSNP, strEmail, , ,
strSubject, , True