Setting up the Programmatic Access in Outlook 2007/2010

For a PCI-related product we have recently installed, I’ve needed to run a script that reads an Outlook mailbox and analyze the message content. Nothing special, but Outlook stops script with the following message

Pretty quickly I have found that I need to change the Programmatic Access settings in Outlook Trust Center. The problem is that all the settings are greyed out

None of the recommended registry changes helped. So, I have opened a case with Microsoft that has given me even more information than I expected to get

First thing first:

Outlook 2007 and later does not allow running the scripts on the systems without or with outdated antivirus. Outlook relies on OS API and needs OS response to find out whether the antivirus is installed and running.

However, believe you or not, only client OS has such API. No, Windows Server does not have it. And yes, I have tried to run my script against Outlook installed on Windows Server. Even though I started with Office support, we have involved the Server support specialist, who has confirmed that Outlook scripting does not work on Windows Server without the warning. No way, by design.

So, I moved over to Windows 7

Here the registry value

DWORD:ObjectModelGuard = 2

in the key


does the trick.

More interesting, that playing with Outlook in Windows Server we tried many values in the same registry key. Try one of these if ObjectModelGuard does not work for you

PromptOOMItemPropertyAccess = 2
PromptOOMSend = 2
PromptOOMAddressBookAccess = 2
PromptOOMAddressInformationAccess = 2
PromptOOMFormulaAccess = 2
PromptOOMAddressUserPropertyFind = 2
PromptSimpleMAPISend = 2
PromptSimpleMAPIOpenMessage = 2
PromptSimpleMAPINameResolve = 2
AdminSecurityMode = 3


8 Responses to Setting up the Programmatic Access in Outlook 2007/2010

  1. says:

    Interesting stuff. Since the registry key points to HKCU\Software\Policies, these settings can be controlled via Office 2007 user GPOs.

  2. Anonymous says:

    These extra registry settings did the work for my OUTLOOK2010. Thanks!

  3. yuhong says:

    Or simply run outlook as admin using the right-click method to change the settings.

  4. Anonymous says:

    Try setting UAC to Never

  5. DX says:

    Much appreciated solution. Tried for hours to get this to work with adm templates and some other stuff but none of it did the job, except your offered registry entries. So far I can confirm that it works on Win 7 and Server 2003 with Outlook 2010. Thx!

  6. Mr P says:

    Value name ObjectModelGuard Value type REG_DWORD Value data 0x2 (2)

    Value name AdminSecurityMode Value type REG_DWORD Value data 0x3 (3)
    Value name PromptOOMSend Value type REG_DWORD Value data 0x2 (2)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: