AW: Von Exce lNachricht über Communicator
26.07.2013 06:56:40
Mühli
Hallo ich poste mal den Code:
Sub Test_send_IM()
Dim msgr As CommunicatorAPI.IMessengerConversationWndAdvanced
'Debug.Print "signin " & CommunicatorAPI.GetContact(*** Email address is removed for privacy *** _
, CommunicatorAPI.MyServiceId).SigninName
'Debug.Print "friendly " & CommunicatorAPI.GetContact(*** Email address is removed for privacy * _
**, CommunicatorAPI.MyServiceId).FriendlyName
'Debug.Print "status " & CommunicatorAPI.GetContact(*** Email address is removed for privacy *** _
, CommunicatorAPI.MyServiceId).Status
cStatus = CommunicatorAPI.GetContact("Max.Mustermann@somewhere.de", CommunicatorAPI.MyServiceId) _
.Status
Select Case cStatus 'make sure there are active, online, or busy- avoid errors from trying to _
IM someone offline or DND
Case 2, 10, 34:
Set msgr = Messenger.InstantMessage(CommunicatorAPI.GetContact("Max.Mustermann@somewhere.de", _
CommunicatorAPI.MyServiceId).SigninName)
msgr.SendText "First Message Sent"
Sleep (500)
msgr.SendText "Second Message Sent"
Sleep (500)
msgr.SendText "Third Message Sent"
End Select
Application.ScreenUpdating = True
End Sub
Es kommt die Fehlermeldung "Mehrdeutiger Name" und .MyServiceId ist markiert.