Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All


This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The Messenger object is the entry point to using Office Communicator Automation API. An application must first create an instance of this co-class to access the basic Communicator functionality programmatically, including signing in, signing out, querying contacts, adding or removing a contact from the contact lists of the signed-in user, querying and managing presence, and initiating an instant messaging session including voice chat or a phone conversation with a contact.

The Messenger object implements the IMessenger3 interface and the DMessengerEvents dispinterface. The IMessenger3 interface inherits from IMessenger2 interface, which in turn inherits from IMessenger interface. Instantiation of a Messenger object is the prerequisite for calling the methods and properties on a running Communicator instance and receiving events from the Communicator instance. A Messenger object can only be an in-process or out-of-process object.

The following remark applies to scriptable languages. Although some scriptable members of the Messenger object deal with user-specific information (for example, a friendly name or sign-in name), user-specific information is never available through script.

Object Information

Class ID



Implemented interfaces



Instantiation method

Call the CoCreateInstance setting the CLSID parameter to CLSID_Messenger


Msgrua.h, Msgrua.idl


Microsoft® Office Communicator Automation API

Operating systems

Microsoft Windows Server® 2003, Windows® XP SP1 or later, or Windows 2000 SP4. Communicator-imposed restrictions apply.

The following code example illustrates the creation of an instance of the Messenger object and the calling of the IMessenger::AutoSignin method on the new object. All further examples in the SDK reference refer to communicator, the instance of Messenger created in this example.

CommunicatorAPI.MessengerClass communicator = new CommunicatorAPI.MessengerClass();
bool connected = false;
int parentHandle = 0;
string account = "jaya@contoso.com";
string passwd = "abc123";
     connected = true;
catch (ArgumentException AE)
catch (COMException CE)

Community Additions

© 2015 Microsoft