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).


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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: