How To Send Email With Access And Outlook VBA

There are 3 things you probably want to send from your Access application. You probably want to send an Access report or send an attachment(s).

1. Email An Access Report (SendObject)
2. Email An Access Report With Attachments (Outlook Automation)
3. Email With Attachment(s) (Outlook Automation)

First, if you are in the database, and want to send an item in the database (like a report), you can do this:

1. Email Access Report With VBA

2. Email An Access Report With Attachments (Outlook Automation)

In my opinion, only the paths to the files should be stored in the database, even though Access now offers the cool little “Attachment” data type.

I don’t use it. Store the path to the file in the table cell and then enter the ParentID of which other record it belongs to.

If you want to send the Access report with some attachments, do the following:

1. When you click the “Email” button, export the report as a pdf to the folder that has all the files.
2. Use the next email function to put all the contents in the email “box” then you can send it.

That’s all.

3. Send An Attachment With VBA (with or without attachments using Outlook automation)

This way would work without “SendObject”. First you would have to output your report in PDF format, and then just add it in as an attachment.

If you have other ideas, please share them in the comments below.

Free! Subscribe To Our YouTube Channel!

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather
Tags: , , ,




 

Call Erik Now