How to attach file into email

M

March

Hello All,


I would like to know how to write VBA to attach file then send it email.

I use sendobject method as the code following this


DoCmd.SendObject acSendReport, "<reportfilename>", acFormatRTF, "<sender
email>", "", "", "TEST", "Testing", True


the code is send the email of report that I created in Access.

However, I change the format of the file from RTF to PDF, that means I need
to attach the PDF in my email.


I don't know that how can I correct the code above or any other methods that
I need to use.


Please give me suggestion.

Thank you,


March
 
T

Tony Toews [MVP]

Wayne-I-M said:
As far as I know (may be wrong) SendObject will only attach "access" objects.

I should've added SendObject's twenty limitations
http://www.granite.ab.ca/access/email/sendobject.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

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