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

南楼画角 提交于 2019-11-26 22:09:59

问题


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!


回答1:


Please keep noted that there are two products:

  • Skype for Business (SfB) [former known as Lync]
  • Skype for Consumer (SfC)

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.



来源:https://stackoverflow.com/questions/43139603/excel-vba-skype4comlib-is-not-working-with-skype-for-business-sfb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!