SecurityManager.2005 for Office 2010 error: Value does not fall within the expected range.

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

SecurityManager.2005 for Office 2010 error: Value does not fall within the expected range.
 
Ion Tranca




Posts: 3
Joined: 2010-07-09
We just upgraded to provide Office 2010 compatibility and the following code:

Microsoft.Office.Interop.Outlook.Application OutlookApp = new Microsoft.Office.Interop.Outlook.Application();
AddinExpress.Outlook.SecurityManager securityManager = new AddinExpress.Outlook.SecurityManager();
securityManager.ConnectTo(OutlookApp);

throws the above error for the ConnectTo method, but only when executed inside an Outlook Addin. If executed as stand alone application it works just fine.

I'll appreciate any hints.

Ion
Posted 09 Jul, 2010 15:48:40 Top
Andrei Smolin


Add-in Express team


Posts: 14140
Joined: 2006-05-11
Hi Ion,

You must not invoke that method in an add-in.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 12 Jul, 2010 04:08:28 Top
Ion Tranca




Posts: 3
Joined: 2010-07-09
Andrei,

You really confused me now.
What should I do in an add-in?

Ion
Posted 12 Jul, 2010 07:47:53 Top
Andrei Smolin


Add-in Express team


Posts: 14140
Joined: 2006-05-11
Ion,

In an standalone application, you need to call that method. In an add-in, you don't need to call it.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 12 Jul, 2010 08:23:44 Top
Ion Tranca




Posts: 3
Joined: 2010-07-09
so I can just call

securityManager.DisableOOMWarnings = true;
?

Ion
Posted 12 Jul, 2010 08:27:54 Top
Andrei Smolin


Add-in Express team


Posts: 14140
Joined: 2006-05-11
Yes.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 12 Jul, 2010 08:55:28 Top