I have a VBA application that synchronizes the Calendar with SQL server. One of the columns in my DB table needs to show the current IM presence status image the same way you'll see it in Outlook or in the Messenger client.
I have managed to connect and get values from my Messenger object but fail when trying to implement the event handler OnMyStatusChange. My VBA project gets compilation error saying "Procedure declaration does not match description of event or procedure having the same name".
This is non-working my attempt:
Public WithEvents oComm As CommunicatorAPI.Messenger
Set oComm = CreateObject("Communicator.UIAutomation")
Private Sub oComm_OnMyStatusChange(hr As Long, ByRef mMyStatus As MISTATUS)
Dim username As String
If hr = S_OK Then
MsgBox "My status changed from " + CStr(mMyStatus)
' Do something like get the new status and update the DB
When I look into the object explorer I see that the doc for the Messenger class event handlers exactly assumes this implementation:
Event OnMyStatusChange(hr As Long, mMyStatus As MISTATUS) Member of CommunicatorAPI.Messenger My status changed.
Please, anyone, I have googled this for days now and I seem to be the only one on this planet facing these problems :(
Office 2010, Communicator 2007