Disable Outlook object model security guard
in Outlook 2019, 2016, 2013 and lower
What Outlook versions have the Object Model Guard?
The Outlook 2000 E-mail Security Update has added to Outlook one more security issue which was later called the Outlook Object Model Guard. Starting from Outlook 2000 Service Pack 2 that included this Outlook Email Security Update, all versions of Microsoft Outlook trigger security prompts and block access to Outlook objects in an effort to prevent malicious programs from retrieving email addresses from Outlook data and using Outlook to propagate viruses and spam.
You will get the security warning if you access protected Outlook objects from inside of your stand-alone applications that automate Outlook 2000 with service packs 2 and 3, Outlook 2002 (any releases and any service packs), Outlook 2003 (any releases and service packs), Outlook 2007, Outlook 2010, Outlook 2013, Outlook 2016, and Outlook 2019.
If you develop Outlook add-ins, you will get the security alert only in Outlook 2000. Any later versions of Outlook support the Trusted Add-ins technology that allows you to bypass the object model guard.
Outlook security guard triggers the following dialog boxes:
A program is trying to access e-mail addresses you have stored in Outlook
A program is trying to automatically send e-mail on your behalf
What Outlook objects are protected by the Outlook E-mail Security Update
In terms of the Outlook Security Manager all blocked Outlook objects are called protected objects. The Outlook object model security guard protects the Outlook objects described below.
The Outlook.Item object
The Outlook object model guard prevents accessing the following issues of the Outlook.Item object:
Address Books, Recipients and Outlook Items
Outlook Email Security Update protects Outlook Address Books, the Recipients collection and Outlook items objects, namely:
What Outlook Security Manager provides to bypass the Outlook Object Model Guard
Outlook Security Manager provides a special property, DisableOOMWarnings, that disables all Outlook security warnings triggered by the object model guard on accessing protected objects. For example:
Visual Basic .NET
The code example above is in Visual Basic .NET, but the Outlook Security Manager supports all .NET programming languages, including VB.NET, C#, C++, J#, Delphi for .NET, RemObjects Chrome as well as Delphi for Win32, Visual Basic 6, Visual C++ 6, Visual Basic for Applications including Access VBA, Excel VBA, VBScript, JScript, etc.