Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending a Report in the body of an email 2

Status
Not open for further replies.

dvlarsen619

Programmer
Feb 3, 2008
5
US
Hello all. I have a question about sending a report, or the content of a report in the body of an email instead of an attachment. Can this be done? I currently use the following to send a report:

DoCmd.SendObject acSendReport, "rpt_PacificLegalStatus", "(*.rtf)", , , , , , 1

The reports RecordSource is a query with a filter to get the report needed from the form the SendObject Command button is on.

I would like the reports content to be the email. ANy help or direction would be grateful. Thank you.
 
If you write your email using CDO you can generate the html body how you like. You'll need to execute your qry beforehand, but your sending report will be doing this anyway, so it will be no slower.

Google, CDO.
 
>>Im dont know what that means
Googling CDO Email should provide an explanation
--------------------------------------

Your solution depends on many different factors.
Can the report be formatted in plain text? If so, make it the body of a plain email. You can use SendObject here.

If it has to be rich text, then it becomes much more complicated. Explore HTML email ( using something like the CDO class) or consider using Outlook Automation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top