Access 2007 - Use Report or HTML file as body of Outlook email mes

D

Dummy

Hi,
I’m using access 2007. I would like to use one of my reports as the body of
an outlook 2007 email message. I’m able to export the report as an HTML file
but can’t figure out how to use either as body of the email message. Is this
possible in VBA? Can anyone help with an example or sample code if possible?

Thanks All

Cris
 
D

Daniel Pineault

You can send HTML e-mail using Outlook automation. Sample code can be found at

http://www.devhut.net/index.php?lang=en&pid=0000000013#SendHTMLEmail

However, you will first need to read your html file into vba so you can use
it as the subject variable in the above listed procedure. To do that you can
use:

http://www.devhut.net/index.php?lang=en&pid=0000000027#ReadFile
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
J

JP

FYI, your sample code uses the olMailItem constant in late-bound code.
It won't compile if someone downloads it and tries to use it (unless
they happen to have a reference to the Outlook object library already
set).

--JP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top