Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preventing Outlook Warning Boxes
Message
From
31/07/2006 09:20:56
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01141234
Message ID:
01141786
Views:
9
> Well, I would say it becomes more like a mine disarming.

:))

>Hi Fernando,
>
>Many thanks for this. Indeed it all becomes a tricky business to use Outlook.automation. I recall some people think that programming as an art. Well, I would say it becomes more like a mine disarming.
>
>>Found by accident while reading article "Simple Human Workflow with Windows Workflow Foundation":
>>
>>When you first ran the sample code you would have noticed that Microsoft Outlook opened a number of warning dialog boxes. These dialogs are a by-design feature of Outlook called the Outlook Object Model Guard designed to reduce the risk of malicious code sending and receiving emails without the user knowing. In order to prevent these dialogs from appearing you need to write your application such that Outlook treats it as trusted code—in most cases this will be by creating an Outlook add-in.
>>
>>An Outlook add-in can avoid showing the warning dialog boxes Outlook add-ins can avoid displaying the security warning dialog box by obtaining references to Outlook objects from the trusted Outlook.Application object. In .NET you can create an add-in either as a COM add-in or as a Visual Studio Tools for Office (VSTO) add in.
>>
>>If you create your add-in as a COM add-in by implementing the IDTExtensibility2 interface, then you should use the Application object returned from the OnConnection method. For more information, see the topic What's New in Microsoft Office Outlook 2003 for Developers?, specifically under the heading "Revised and Improved Security Model."
>>
>>If you are creating an Outlook add-in using Visual Studio Tools for Office, then you should use the ThisApplication object provided by the project template. For more information, see Specific Security Considerations for Office Solutions, specifically under the heading "Minimizing Object Model Guard Warnings."
>>
>>It's important to note that even with the use of trusted code the Outlook Object Model Guard may still restrict your code. If Outlook is used with Exchange, then obtaining all Outlook objects from ThisApplication does not guarantee that your add-in will be able to access the entire Outlook object model. For example, if an Exchange administrator sets Outlook to automatically deny all attempts to access address information using the Outlook object model, then Outlook will not allow the previous code example to access the To property, even though the code example uses the trusted ThisApplication object.
>>
>>http://msdn.microsoft.com/winfx/technologies/workflow/default.aspx?pull=/library/en-us/dnlong/html/hmnwkfwwf.asp
Previous
Reply
Map
View

Click here to load this message in the networking platform