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).
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
Leave a Reply