I have a VBA (I know this .NET but I'm desperate) 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:
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
Thanks, Peer
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:
VB.NET:
[/FONT][/COLOR]
[COLOR=#00008B]Public[/COLOR] [COLOR=#00008B]WithEvents[/COLOR] oComm [COLOR=#00008B]As[/COLOR] CommunicatorAPI.Messenger
[COLOR=#00008B]Set[/COLOR] oComm = CreateObject([COLOR=#800000]"Communicator.UIAutomation"[/COLOR])
[COLOR=#00008B]Private[/COLOR] [COLOR=#00008B]Sub[/COLOR] oComm_OnMyStatusChange(hr [COLOR=#00008B]As[/COLOR] [COLOR=#00008B]Long[/COLOR], [COLOR=#00008B]ByRef[/COLOR] mMyStatus [COLOR=#00008B]As[/COLOR] MISTATUS)
[COLOR=#00008B]Dim[/COLOR] username [COLOR=#00008B]As[/COLOR] [COLOR=#00008B]String[/COLOR]
[COLOR=#00008B]If[/COLOR] hr = S_OK [COLOR=#00008B]Then[/COLOR]
MsgBox [COLOR=#800000]"My status changed from "[/COLOR] + [COLOR=#00008B]CStr[/COLOR](mMyStatus)
[COLOR=#00008B]End[/COLOR] [COLOR=#00008B]If[/COLOR]
[COLOR=gray]' Do something like get the new status and update the DB[/COLOR]
[COLOR=#00008B]End[/COLOR] [COLOR=#00008B]Sub[/COLOR][COLOR=#000000][FONT=Arial]
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
Thanks, Peer