Email from Access

A

Abe Katz

Hello All,
I'm using the following code to send email with Outlook, it works fine.
wBody is, the user enters any text to put on the body of the email.
wOutput is, the attached word document or a PDF file the user selects.

Is there a way to put the document or the PDF onto the Body of the email so
the recipient doesn't have to open the attachment and see it right away as
they open the email.

With objEmail
.To = wEmailAdrs
.Subject = wSubject
.body = wBody
.Attachments.Add wOutPut
.Send
End With

Thank you very much in advance
abe
 
D

Dorian

No. An email is either text or html. PDF is a completely different format
which can comtain both text and images. You could put a link to the PDF file
in the body if your email is html format. Use the standard html syntax for
embedding a hyperlink.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
M

Mark Andrews

You could create the body of the email in a creative way such as:
- using code (run through a recordset and produce results similar to the
report)
- exporting a report to txt or html format and then reading it back into the
body of the email

Note: Access HTML generation is sometimes pretty weird (so test a good deal
before you try and use this in a repeatable process).

If you want to see an example of the second approach:
http://www.rptsoftware.com/products/email/

We use a DLL (instead of relying on Outlook, so it works for everyone) but
the same concept applies.

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
 

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