Emailing Reports as Html Attachments - 2nd Posting

C

Chuck

I have an application that has functionality for sending
reports as html attachments via email(found a sample db
online). In testing the code below, I have notice that
when the email recipient of the html report opens the
attachment, it opens just fine but on closing the
attachment the following dialog box pops up: The system
can not find the file specified. Here's the code
-------------------------------------
Dim strDocName As String
Dim strEmail As String
Dim strMailSubject As String
Dim strMsg As String

strDocName = Me.lstRpt
strEmail = Me.txtSelected & vbNullString
strMailSubject = Me.txtMailSubject & vbNullString
strMsg = Me.txtMsg & vbNullString & vbCrLf & vbCrLf
& "Your Name" & _
vbCrLf & "MailTo:[email protected]"

DoCmd.SendObject objecttype:=acSendReport, _
ObjectName:=strDocName,ouputformat:=acFormatHTML, _
To:=strEmail,Subject:=strMailSubject,MessageText:=strMsg

----------------------------------------

Any recommendataions to stop the incorrect dialog box
would be greatly appreciated.

Thanks,
Chuck
 
Top