Email report in body of email (1 Viewer)

Timax

Registered User.
Local time
Yesterday, 19:26
Joined
May 14, 2015
Messages
33
Hi, I have a task where I need to email to customers complex report that is being generated within access and I need to do it in the body of the email. What is the best way to approach that? Seems that I had no luck finding anything in the net. Worst case probably in attachment. Please help. Thank you
 

Gasman

Enthusiastic Amateur
Local time
Today, 03:26
Joined
Sep 21, 2011
Messages
14,336
I would have to ask why?, as it is not particularly user friendly?

If it was me, i would prefer a pdf attachment.?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 21:26
Joined
Feb 28, 2001
Messages
27,209
The report in question will have a bunch of "sections" that can include details, group headers and footers, page headers and footers, and report headers and footers. If you are generating a report that you need to look like an e-mail, you MIGHT be able to put text sections in the report header to make it look like an e-mail and in the footer to include your e-mail signature and follow-up comments. Then use the "DoCmd.SendTo" action, which you can easily look up on-line.

It's easy enough to try it and see if you like it.
 

Timax

Registered User.
Local time
Yesterday, 19:26
Joined
May 14, 2015
Messages
33
Thank you very much for your input on this. My problem is that I need to send report via email automatically and DoCmd.SendTo, opens up mail client. I need to automatically convert report to pdf, attach to an email (with email address that will be coming from complex query) and send it without interaction of a live person. I know how to do most of it but not sure how to convert report to pdf and attach to email. Any thoughts on that?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 10:26
Joined
May 7, 2009
Messages
19,247
do create a PDF out of your report use DoCmd.OutputTo:

DoCmd.OutputTo acOutputReport, "yourReportName", acFormatPDF, ["pathAndFileNameToSave]"]
 

Timax

Registered User.
Local time
Yesterday, 19:26
Joined
May 14, 2015
Messages
33
Thank you for the tip. I export as PDF, Attach and then delete? How do I delete this file after I send?
 

Users who are viewing this thread

Top Bottom