Automating Office Communicator 2007 using the Microsoft Office Communicator 2007 SDK
The Microsoft Office Communicator 2007 SDK allows you to automate a running instance of Office Communicator 2007 to integrate Communicator functionality into your applications.
There are a bunch of other SDKs that the Unified Communication team puts out. The difference between them can get confusing, let's clear some things up for this specific SDK.
- You need to have Office Communicator 2007 installed and running
- The SDK works by automating functions of Communicator, e.g. when you start an IM conversation through code, a Communicator window actually launches
Check out the "what others are downloading" section of the download link above for links to some of the other SDKs.
The SDK comes with a help collection, but no sample applications. There are some good snippets of code in there, but it's pretty dry reading.
I put together a sample WinForms application that showcases some of the functionality that the SDK provides, it beats reading the help file to figure out what the difference between the IMessenger, IMessenger2, and IMessenger3 interfaces is.
The Visual Studio 2008 project includes some presence controls which you can download separately if you'd like.
I've worked on a couple of projects that involved using this SDK, here are some useful tips from stuff I've come across:
- Communicator allows you to add distribution lists as contacts, e.g. I add the Clarity "All Employees" group and automatically get everyone in Clarity on my buddy list. If you do this, you don't get the individual members of the group as contacts - they won't be in Messenger.MyContacts
- Clean up after yourself. This a COM automation API, use Marshal.ReleaseComObject to properly dispose of Communicator objects
- Various interfaces inherit from each other to provide more functionality, e.g. IMessenger3 inherits from IMessenger2 which inherits from IMessenger1