I LOVE integrating Access with Outlook, it’s really easy to create a system that allows our clients to export reports as PDF attachments in an email.

Objective:
Email pdf invoice to a recipient using Outlook.

Needed
Option table to hold templates for the Subject and body of email.
Make sure client table has BillingEmail field.
Add three buttons to form: One to email, another to edit customer record and another to pop the option table.

Table Needed: tblOptions
We usually have an options table in our apps to control defaults and other aspects of the database. In this case we are going to create a simple table and form that will allow admins to edit subject and email body options. Here is a screen shot of what it looks like in our app:

Email reports from Access as PDF attachments in Outlook

The Email Body field is a Memo type and the Subject line is only a text field.

Email Invoice Form
We added three buttons to the email invoice form, a portion can be seen below:
InvoiceForm

 

 

The Email Inv button will do exactly what it says: print the invoice to PDF, launch an Outlook message, attach the PDF and prepare the subject and email body. You can view the code here.

The Customer button simply launches the customer form and allow the user to enter or edit the destination email address.

Here’s how the email looks like when it’s all done, (the email To field was deleted to protect the receipient):

Email