Send Report using email

M

MikeS

I have a module setup to email reports from my program. The code is as
follows:

Public strReportName As String
Public strTitleName As String

Function Mal_Lab_Report()
On Error GoTo Err_Mal_Lab_Report
Dim MyDate As String
Dim strRec As String

MyDate = Format(Now(), "mm/dd/yyyy")
strRec = "(e-mail address removed)"
DoCmd.SendObject acSendReport, strReportName, acFormatHTML, strRec, , , _
"Mal " & strTitleName & " - " & MyDate, , False

Exit_Mal_Lab_Report:
Exit Function

Err_Mal_Lab_Report:
MsgBox Err.Description
Resume Exit_Mal_Lab_Report

End Function

The first few times I ran this it worked perfectly with the report in the
body of the email. However, something has changed and it now shows up as an
Excel attachment.

Can anyone explain this?

Thanks in advance.

MikeS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top