Consulting

Results 1 to 3 of 3

Thread: Outlook VBA with Communicator API Messenger

  1. #1
    VBAX Newbie
    Joined
    Feb 2014
    Posts
    2
    Location

    Question Outlook VBA with Communicator API Messenger

    Hi,
    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".

    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)
    End If
    ' Do something like get the new status and update the DB
    
    End Sub


    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

  2. #2
    possibly a typo, but i see a byref difference

  3. #3
    VBAX Newbie
    Joined
    Feb 2014
    Posts
    2
    Location
    I've tried all possible parameter variants and all give me the same compilation error

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •