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::Signin method on the new object. All further examples in the SDK reference refer to communicator, the instance of Messenger created in this example.

Copy Code
CommunicatorAPI.MessengerClass communicator = new CommunicatorAPI.MessengerClass();
bool connected = false;
int parentHandle = 0;
string account = "";
string passwd = "abc123";
	 communicator.Signin(parentHandle, account, passwd);
	 connected = true;
catch (ArgumentException AE)
catch (COMException CE)

See Also