E-Mail Access report

Glen

New member
Local time
Today, 18:51
Joined
Jul 12, 2000
Messages
8
I need to distribute a weekly report via e-mail to a list of users. The report has some fairly complex formatting which tends to get lost when I export to excel for onward e-mailing.
Is there any way I can e-mail the report direct from Access (either 97 or 2000) ??
Your help is much appreciated.
 
Here is the code to send it in rich text format:

DoCmd.SendObject acReport, "ReportName", "RichTextFormat(*.rtf)", _
"AnyEmail", , , "OptionalSubject", "OptionalText", False

Just replace the Report name with your reports name, AnyEmail with the email address, OptionalSubject and OptionalText with any text you might want to add to the message. If you don't want to fill the subject or text with anything just leave the space between the commas blank.

If you want to pull the email address, subject or text from a field on your form you can do it by substituting the "AnyEmail" with Me.YourTextBoxName (no quotes). And you can do the same thing for the other optional items.

Post back if you have more questions.
 
By the way I forgot to mention you can put that code behind a command button on any form.

If you would rather do it with a macro you can do it with the SendObject.
 
Talismanic, Glen,

Please excuse my butting in?

Can I use this code to send one page of a multi-page report to the email address on the report. e.g. 100 different teachers get one page per teacher. Then use the textbox name Me.Report![CourseDateUsageAll]![Teacher_Email]

Thanks


[This message has been edited by harix (edited 01-09-2001).]
 
harix, I think it would be possible but I would need some time to work it out.

Also, maybe some one else who has done this will post a solution. Either way, I will get back to you shortly.
 
Is there a way to use this to a distribution list?

Robert
 

Users who are viewing this thread

Back
Top Bottom