Sending Office Communicator Message from Excel Macro
Many Corporate Companies with Windows as their primary operating system use Microsoft Office communicator as their official messenger. Everyone in the Organization will be connected to this Messenger application and sending an online or offline message is made easy with this application.
Without a Messenger like this Employees have to choose a formal way of communication through Emails. But this messenger conversation makes it easy to contact anyone and have formal/friendly conversations.
This article explains how to send IM messages to your friends through Excel. The code in this page can be customized to send messages to multiple recipients with just one click.
Excel VBA Macro to send Office communicator message
To use this code in your machine, you should be having Office Communicator installed & a valid user ID to use the messenger.
Create a new Excel workbook and press Alt + F11 to view the VB Editor. Copy paste the below code into the VB Editor and replace the Email Id or Signing Id of your friend in the code. The code can be executed by pressing F5. Before that, read the note below.
Note: From Menu Tools -> Reference & Add “Microsoft Office Communicator API Library“, before executing the below code.
Visual Basic1234567891011121314151617'Visit http://officetricks.com for free tips and tricksPrivate Sub IM_Friend_Send_Communicator_Message()'Microsoft Office Communicator API Library - Include this library before proceedingDim CC_Signin As String, IM_Text As StringDim objCC As New CommunicatorAPI.MessengerDim objCCWnd As CommunicatorAPI.IMessengerConversationWndAdvanced'Provide Signin ID of Friend Whom your want to IM. In most cases it will be a Email IDCC_Signin = "Friends Signin ID or Email ID"IM_Text = "[Message from Communicator - Automatic from VBA Code]"'Create a Commincator MessageSet objCCWnd = Messenger.InstantMessage(CommunicatorAPI.GetContact(CC_Signin, CommunicatorAPI.MyServiceId).SigninName)objCCWnd.ShowobjCCWnd.SendText IM_Text'objCCWnd.CloseEnd Sub
Leave a comment below if there is any issue with the above code.
The above code can be mapped to a Command button and made to send message with a single button click. When there is a need to send messages to lot of friends, this code can be used as a bulk message forwarding application. But take care of any loops that you use, because it might end up in sending too many messages to your friends in case if you loop becomes endless.
IM your Friend in Communicator from Excel
Top5 Trending Posts