excel vba SKYPE4COMLib is not working with Skype for Business (SfB)
Asked Answered
L

1

2

Is there a way to send messages via Skype for Business using excel VBA? I tried to add SKYPE4COMLib and following code:

Sub skype()
Dim aSkype As SKYPE4COMLib.skype
Set aSkype = New SKYPE4COMLib.skype
Dim oChat As Chat
Dim skUser As SKYPE4COMLib.user
    Set skUser = aSkype.user("user_name")
    Set oChat = aSkype.CreateChatWith(skUser.Handle)
   oChat.OpenWindow
   oChat.SendMessage "automated message"
End Sub

But it is not working :( Is it even possible? Thank you very much!

Labiodental answered 31/3, 2017 at 11:30 Comment(0)
U
2

Please keep noted that there are two products:

both products can be used for chat & calls (VOIP) however they are not the same products. SfB is mostly used for companies where SfC is mostly used for consumer as you can download the client here for free and can as well use some features from SfC for free.

The Skype4com.lib is only compatible with SfC and not with SfB. This is due to the reason that Lync 2013/SfB 2015 does not expose COM entry points that Excel can use (see here). If you wish to send chats with SfB you should check UCWA 2.0.

Ultimogeniture answered 2/4, 2017 at 19:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.