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 Access report to e-mail

Status
Not open for further replies.
Oct 2, 2002
2
US
I have an Access application (A2K) with a report that creates an invoice. I would like to e-mail this report. However I do not want it to be an attachment. I want the report output to be the body of the e-mail (preferrably html). The File->Send_To menu only shows mail recipient (as attachment). I also need this to be somewhat easy (i.e. I don't want to have to export as one format, open another application, import ...) I will be doing hundreds of these a day and hopefully completely automating it in the near future.
 
Hi

You could create an instance of Outlook with CreateObject(), see also GetObject(), and populate the the EMail body with you report, then send the EMail, all from within Access.

The only bit which may be a bit problimatical is "populate the the EMail body with you report", you could either write code to populate the EMAil body with the text, or maybe (have not thought in detail) output the report to a temporary textfile, then read that in and populate the EMail body.

Either way, do not see how you will be able to have any fancy stuff like lines, logos etc.

I recently worked on a project which involved send lots of EMails to clients containing lists of Sales leads, and by customer is using it quite happilay, so the idea is feasible, just needs a bit of thinking time.



Hope this helps

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
kenneth.reaySPAMNOT@talk21.com
remove SPAMNOT to use
 
Hi,
iam able to send only one reports through my outlook email with the below code
DoCmd.SendObject acSendReport, objectname, acFormatXLS

But,how can send many reports in one email??
please help me out
regards
srihari
 
Hi

Write the output to a file (using docmd.outputto), then use create an instance of outlook (using CreateObject) and create an email messages with 'n' attachments, see Access Help Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top