Untrusted code to TRUSTED code ...

  • Thread starter Thread starter KSor
  • Start date Start date
K

KSor

How do I make this C# code TRUSTED:

1 Microsoft.Office.Interop.Outlook.Application oApp =
2 new Microsoft.Office.Interop.Outlook.Application();
3 oNS = oApp.GetNamespace("MAPI");

?
 
Where is this code running? Is it in a COM addin or in standalone code? What
version of Outlook?

For Outlook 2007 you are trusted, even in standalone code, if you have an up
to date anti-virus and your settings are set correctly. For Outlook 2003 and
earlier you never are trusted in standalone code, you can be trusted for
addin code in Outlook 2003 if you use the Application object passed to you
to derive all of your other Outlook objects.

See http://outlookcode.com/article.aspx?id=52 for additional information on
trusted Outlook code.
 
Back
Top