Disable Outlook Security Warning Window – Solutions
This article explains how to prevent / disable the Outlook security warning window on all modern Outlook versions, including Outlook 2019. The Outlook security warning window pops up whenever a non-trusted program (Outlook add-in, Macro script, etc) is trying to access Outlook and send email on your behalf. The goal of this Outlook security warning is to notify you about this action and prevent unauthorized Outlook access. However, if you actually want to use Outlook is a programmatic way, this Outlook security warning can become annoying.
There are two major situations that can trigger an Outlook security warning window:
– you are using a VBA / Macro that needs to send email through Outlook;
– you are using a 3rd party program or Outlook add-in.
Disable the Outlook security warning for VBA / Macro Scripts
Let’s say you are using Microsoft Access to send email through Outlook using Access data. You’ve likely designed a Macro using the standard SendObject command, something like:
DoCmd.SendObject , , “*html”, email_address, cc, , Subject, emsg, False
However, as you’ve probably noticed, using the above SendObject command triggers the Outlook security warning popup window.
Solution: instead of using the SendObject command, use the SendMail() function. Here is a working Macro example that simply does NOT trigger the Outlook security warning window (just copy & paste it to your VBA Macro editor window):
Dim outl As outlook.Application
Set outl = New outlook.Application
Dim mi As outlook.MailItem
Set mi = outl.CreateItem(olMailItem)
mi.Body = “test message”
mi.Subject = “message from access”
mi.To = “
mi.Send
Set mi = Nothing
Set outl = Nothing
End Sub
If you try to run the above VBA Macro and you receive an “invalid user type” error, please make sure you enabled the Outlook reference in VBA. To enable it, open VBA (Visual Basic Applications) with the Macro editor, then go to the Tools menu -> References -> mark the option to use “Microsoft Outlook 15.0 Object Library” (Outlook 15.0 means Outlook 2013, so you have to replace the Outlook 15.0 version number with the actual version number of your Outlook installation).
Disable the Outlook security warning for Outlook add-ins / 3rd party apps
If you don’t have access to the source code of the program that triggers the Outlook security warning, obviously the above method is not going to work for you. To solve it, you have to use a program designed to disable the Outlook security warning window.
Meet Bells & Whistles for Outlook: among several other features, this Outlook add-in gives you the option to disable the Outlook security warning window. Simply install it, start Outlook, open the Bells & Whistles Options menu located on your Outlook toolbar area, go to the Outlook Tweaks tab and mark the option “Auto-confirm Outlook security warning messages”. That’s it!
Bells & Whistles offers a free trial period, so you can install it and see if it solves your Outlook warnings issue, before actually paying for it. It works with all versions of Outlook, starting from Outlook 2003 (x32 and 64 versions).
I copied SendEmail() into VBA in Access 2007 and it gives me a compile error for both mi.Body = and mi.Subject = lines. Any ideas? I do have the Outlook library in References
Hi. This sendmail() code really helped me.
However, I want to include an access report into the email.
Is this possible?
Thanks
AJ
[…] without editing it again, you can be notified for missing file attachments or other alerts, you can automatically confirm Outlook security warning messages, you can easily choose which file extensions to allow or deny in Outlook and you can use the Bells […]
I only used this :
DoCmd.SendObject acSendNoObject, , , “mymail@home.nl”, , , “subject”, “test”, false
But using sendmail() in combination with bells and whistles seems to cure it.
Great 🙂
Hi,
I tried the vba sendmail option, but it triggers the outlook waring message just as well. I’m using access 2013 on windows 8
We’ve also tested on Access 2013 with Windows 8 and Outlook doesn’t trigger the warning message… maybe there is another vba code section of yours that triggers the warning… that message is triggered not just if you try to send an email, but also if you try to load Contacts (or other functions considered sensitive by Outlook).
Hi,
Bells & whistles triggers the warning message as well…
Yes, as detailed in the above article, unfortunately for VBA Access code the Outlook warning window belongs to the Access Windows process / task, so Bells & Whistles can’t identify & “kill” it…