Send email without outlook security warning

The solution below can only be used with Office 2003. For Office 2007 you should not have this problem - assuming you have an anti-virus program installed. With Access 2000 - 2002 you will have to  send mail using SMTP.

send email warning

This message is part of the Outlook Security Model and cannot be disabled. Note that the problem does not happen in Outlook 2007 - at least if you have a virus scanner installed.

Fortunately since Outlook 2003 it is possibe to avoid the warning messages using VBA code to be put inside Outlook.

In Outlook 2003 or later, if a MAPI MailItem object is created from within the VBA project (specifically the 'ThisOutlookSession' module), it is assumed to be "Trusted" and will not prompt the usual security messages when attempting to call the .Send method or when making use of the Outlook address book.  We will be using this "Trusted" method to create an exposed Outlook VBA function that creates and sends the MailItem and then call this using Automation from our application.  In our example, we will be calling the exposed Outlook VBA function from within Access. The exposed Outlook function we use from Mail Merge for Microsoft Access is called ammolSendMail.

Setting up the Outlook VBA code

  1. Open Outlook

  2. Go to the menu item Tools / Macro / Visual Basic Editor

  3. In the VB environment expand the project node (usually called 'Project1')

  4. Find and open the module 'ThisOutlookSession' (double click to open)

  5. Copy and paste the code from here: Add this code in module ThisOutlookSession

  6. Sign the Outlook VBA code with a digital certificate (optional)

  7. Trust all documents from this publisher

  8. Close Outlook and safe changes

From now on you will no longer be bothered by the outlook security warning when you send emails using 4TOPS Mail Merge.