Email

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

Guest

I can't figure out what i Did wrong
DoCmd.OpenReport "Mileage POV Form", acViewPreview, ,
"[ID]=[Forms]![Mileage POV]![ID]"
DoCmd.PrintOut acPages, 1, 1, , 2
DoCmd.SendObject acSendReport,,,[Supervisors_Email])


DoCmd.SendObject acSendReport,,,[Supervisors_Email])
this part is Red.
I want to open the report print 2 pages and then email it.
Supervisors_Email is in the query.
Thanks
Chey
 
Hi Chey

I assum you are using a form to start the event so insead of
DoCmd.SendObject acSendReport,,,[Supervisors_Email])

Try

DoCmd.SendObject acReport, "ReportName", "RichTextFormat(*.rtf)",
Forms!FormName!EmailField, Forms!FormName!EMailCCField, "", "Subject of
email", "Body of email", False, ""

You can delete any section you don't need llike this

DoCmd.SendObject acReport, "ReportName", "RichTextFormat(*.rtf)",
Forms!FormName!Supervisors_Email, , "", "", "", False, ""

Hope this helps
 
Back
Top