Hi all, I’m trying to send a Skype message from Excel. I've posted this on a Skype forum, but no-one could help me. I have found the following code on the Skype forum, but when I try to use it as is, I get a run-time error
“CHAT: CREATE: invalid/missing userhandle(s) as argument”
on the line
“Set oChat = aSkype.CreateChatWith(skUser.Handle)”
Sub testingskype()
Dim aSkype As Skype
Set aSkype = New SKYPE4COMLib.Skype
Dim oChat As Chat
Dim skUser As SKYPE4COMLib.User
Set skUser = aSkype.User("minette")
Set oChat = aSkype.CreateChatWith(skUser.Handle)
oChat.OpenWindow
oChat.SendMessage "hello.....testing"
End Sub
So I changed the line to
“Set oChat = aSkype.CreateChatWith(skUser.DisplayName)”
and it seems to run through it OK. However, when I check Skype, I get a blank Skype screen, and although it looks like my message was sent…..it definitely didn’t go anywhere, as there’s no name at the top. It also says "drag contact that you want to add here".
Hope someone can help me.
“CHAT: CREATE: invalid/missing userhandle(s) as argument”
on the line
“Set oChat = aSkype.CreateChatWith(skUser.Handle)”
Sub testingskype()
Dim aSkype As Skype
Set aSkype = New SKYPE4COMLib.Skype
Dim oChat As Chat
Dim skUser As SKYPE4COMLib.User
Set skUser = aSkype.User("minette")
Set oChat = aSkype.CreateChatWith(skUser.Handle)
oChat.OpenWindow
oChat.SendMessage "hello.....testing"
End Sub
So I changed the line to
“Set oChat = aSkype.CreateChatWith(skUser.DisplayName)”
and it seems to run through it OK. However, when I check Skype, I get a blank Skype screen, and although it looks like my message was sent…..it definitely didn’t go anywhere, as there’s no name at the top. It also says "drag contact that you want to add here".
Hope someone can help me.