Total Access Emailer is the world's most popular Microsoft Access email add-in product and VBA code library. Simplify the way you communicate with your contacts, and easily share the data and reports from your Microsoft Access databases with personalized emails for each recipient.
How can I send both the text and the embedded object in the same Email using the Text and HTML format option?
Total Access Emailer for Microsoft Access does not have a built-in option that allows you to embed a filtered report into the body of an email message along with graphic files. This is because Total Access Emailer utilizes the built in functionality of MS Access to achieve the task of converting a Microsoft Access Report into HTML format. When you export an Access report object to HTML, the file does not include graphics from the report, since they are not in HTML format. That said, there are a couple of methods that you can use to work around this.
Using an HTML file as a "template"
In order to display a graphic as part of your HTML email, you can use an HTML file as a "template". Within the HTML file, you can include Field References to fields in your data source table so that each recipient receives the data that corresponds to their record. In the example below (which is taken from the Total Access Emailer sample database), we have an email template form that we're sending to everybody in our email data source. However, in the case of the Field References (that are marked by square brackets surrounding the name of the field which is to be used as a field reference), the name of the field is replaced by the actual data that resides within the field for each recipient record. This occurs when the email message is sent or previewed. In this case, the fields that we have specified to be used as field references are:
See the HTML example below that includes these Field References:
<body> <p style="margin-top: 0; margin-bottom: 0"><font face="Tahoma"><b>Special Sale on [ProductName]!</b><br> <font size="2"><br> <br> Dear [ContactName],<br> <br> Our records show that you previously ordered [ProductName]. We are pleased to let you know that there is a special sale on this item. For a limited time, you can purchase [ProductName] for $[UnitPrice] each! <br> <br> Please contact us to place an order.<br> <br> Sincerely,<br> <br> </font></font><font face="Monotype Corsiva" size="4">[Salesperson]</font><font face="Tahoma" size="2"><br> FMS, Inc. <br> [SalespersonTitle]<br> www.fmsinc.com</font></p>
The HTML code can be imported into Total Access Emailer from a .txt or .html file on the HTML tab. To import your HTML code, press the "Import" button and browse for your HTML file.
If you press the "Hide Code" button (pictured above) you can then see the HTML formatting.
You can add a graphic to the email by adding an HTML reference to a publicly accessible URL that points to a graphic file. In the example below, we pressed the "Display Code" button (pictured above), and then we added the following URL reference to the very top of the HTML code.
To see what it looks like, press the "Hide Code" button and then press the "Preview HTML"button in order to preview the outcome using your default web browser. In the example below, we included a reference to the FMS logo.
Using the Attachment Option
Another relatively simple option is to use the Export to PDF option (this export feature also includes support for other file type options such as html, rtf, txt, and XPS in addition to pdf) . While this option will include your filtered report data along with your report graphics, one caveat with using this option is that the data is not displayed within the body of the email. Instead, it is sent with the email in the form of an attached file. This Export to PDF option can be found on the attachment tab of the Total Access Emailer Addin user interface. On this tab, you will notice the option to Add or Edit Embedded objects. Click either the Add or Edit button to open the filtering options.
Here you will see the filtering options (these filtering options work the same way as the filtering options provided for embedded objects in HTML).