Send Report

K

Keith

I want to a Access report via Outlook in the body of the message not as an
attachment.
 
D

Dale Fye

Keith,

I've never tried this, but you could probably use the OutputTo method to
save the report as a text file (OutputFormat equals either acFormatRTF or
acFormatTXT).

Then you could read the datat from that file (look at the OpenTextFile
method) and write it to your message string one line at a time, followed by
a carraige return/line feed (vbcrlf), then read the next line and append it
to your message string, until you have read the entire file. Then close the
file and delete it.

Then use SendObject to send the message and pass it your message string as
the messagtext parameter. There are issues with Outlook Security and
SendObject, but if don't mind getting the warning message you try to use the
SendObjects, this should work. As an alternative, you can search the web on
those two subjects and you will find some workarounds.

HTH
Dale
 

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