Sending Skype message through Excel VBA

minette

Board Regular
Joined
Jul 8, 2005
Messages
237
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.
:)
 
i have made the procedure sendmessage in excel and it is working at my place.. but this needs to work at the office too.
i have 2 contacts with 2 words in it, separated with a space.. but i can not reach to send to these.. it creates automatically an other contact.. what i don't want.
how do i see what the skype names are.. how does the system knows which skype to call?

please help me with this matter.. thanks
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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.
:)
In VBA to Tools/References tick Skype4COM 1.0 Type Library, OK Run your macro
 
Upvote 0
Hello everyone,

I am trying to send skype(initially lync) meeting invites using excel VBA. I have script ready for normal 'Appointments', but I have to convert them into skype meetings. Could you please let me know how I can go about in this?

Thanks in advance
 
Upvote 0
Hi Everyone,
while running below code I am getting an error message as "Wait Timeout". Please help me resolve this issue.

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) <---{Error message on this line}
oChat.OpenWindow
oChat.SendMessage "hello.....testing"
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,698
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top