Still get security prompt on Recipients.Add

Add-in Express™ Support Service
That's what is more important than anything else

Still get security prompt on Recipients.Add
 
Jan Hyde




Posts: 16
Joined: 2011-04-08
I might have some information that might be relevant to this problem.

In Outlook 2010 there is a setting in the 'Trust Centre' called 'Programmatic Access Security'

The options are disabled and mine is set to 'Warn me about suspicious activity when my antivirus software is inactive or out of date'

Although I cannot change this option via Outlook I can alter it via by adding a registry setting

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Outlook\Security\ObjectModelGuard

If I set this to '2' it will set the programmatic access security to 'Never Warn Me'

Once I set it to '2' I no longer get the security prompt, but if I leave it a '0' then I always get the security prompt.

So it would be interesting to know what this option is set to on the version of outlook you tested my code on?

Can you recreate the problem if your outlook is also set to 'Warn me about suspicious activity when my antivirus software is inactive or out of date'?
Posted 03 May, 2011 10:40:07 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
I am sorry, I wasn't able to reproduce the issue with these settings either. Please send me the required credentials to the support email address when you are ready to start a remote session.
Posted 04 May, 2011 03:54:26 Top
Jan Hyde




Posts: 16
Joined: 2011-04-08
Are you available on Thursday morning for a remote session?
Posted 10 May, 2011 04:03:22 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Hello Jan,

I am ready for the remote session. Please send me the required credentials to the support email address.
Posted 10 May, 2011 04:21:15 Top
Jan Hyde




Posts: 16
Joined: 2011-04-08
OK - Logmein isn't working for us clearly. I will disconnect and try to find something else that might work better for you.
Posted 10 May, 2011 06:33:25 Top
Renat Tlebaldziyeu


Add-in Express team


Posts: 132
Joined: 2010-02-15
Ive noticed that you initialize Security Manager after creating a new Outlook item in your code. Could you please try to use the following code:

Dim SecurityManager As Object
Dim pMailItem As Object 'outlook.MailItem
Dim pOutLook As Object 'outlook.Application

Set SecurityManager = CreateObject("AddInExpress.OutlookSecurityManager")
Set pOutLook = CreateObject("Outlook.application")
SecurityManager.ConnectTo pOutLook.Application
SecurityManager.DisableOOMWarnings = True

Set pMailItem = pOutLook.CreateItem(0)

Call pMailItem.Recipients.Add("janh@dummyemail.co.uk").Resolve

SecurityManager.DisableOOMWarnings = False
SecurityManager.Disconnect pOutLook.Application

Does it work without security warnings?
Posted 10 May, 2011 06:39:50 Top
Jan Hyde




Posts: 16
Joined: 2011-04-08
I changed the code as you suggested but the security warning still comes up.
Posted 12 May, 2011 07:50:22 Top
Jan Hyde




Posts: 16
Joined: 2011-04-08
In case anyone is following this topic; Renat suggested trying a 'repair' on my office installation. This solved the problem for me.

I now need to try the same thing on our terminal services servers to see if it also fixes the problem for my clients.
Posted 12 May, 2011 09:53:18 Top