Tag Archives: COM

New message in Outlook using Silverlight 4 and AutomationFactory

29 Mar

Silverlight 4 makes it possible to use the AutomationFactory (COM) to communicate with applications installed on the client computer.

To use the AutomationFactory itโ€™s required that the application runs as an out-of-browser application with elevated trust. Furthermore itโ€™s required that the user  can use the COM (the client must run on a Windows computer for COM to work – Microsoft have stated they are looking into getting COM+ support working in Silverlight 4 RTM on a Mac).

image

In the sample above I first of all check that the user is running the application with elevated trust and that the AutomatationFactory is available. I create a new dynamic object as an instance of Outlook and a new mail object. I set the To, Subject and Body on the mail object, saves it and finally sends it.

by xamlgeek