SendObject to send email

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I was reading some previous posts about how to email a report using
sendobject however, when I attempt to do this I am getting an error saying
"can't open mail message" Below is the code I am using. Any help would be
appreciated. Thanks
Dim stDocName As String

stDocName = "rptReportName"

DoCmd.SendObject acSendReport, stDocName, , "user@address", , , "test
send", "test message", False
 
you should try this with a MACRO instead of a module first.

it's easier to make sure you've got all the args correctly.

other than that-- do you use outlook??

-Aaron
 
I think you are leaving out the report format:

DoCmd.SendObject acSendReport, "rpt_Whatever", acFormatSNP, "emailaddress",
, , "Subject", , True
 
Back
Top