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.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"KSor" wrote in message
...
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");
?