Objective: Send a message to a Skype contact when a certain macro is done.
Sources: I searched around and found a couple of question in SO trying to do the same thing. This is the base for the code I am using Using Excel VBA to send Skype messages to Group Chat and also this https://www.mrexcel.com/forum/excel-questions/424432-sending-skype-message-through-excel-vba.html Both these questions use a similar code.
Issue: When I run the code I get the following error:
Run-time error '429': ActiveX component can't create object
on the line:
Set aSkype = New SKYPE4COMLib.Skype
Question: Is this API still functional for this kind of procedure? How can I solve the ongoing error?
Code:
Sub testingskype()
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 "message"
End Sub
Obs: I am using option explicit in every module I create.
Skype4COM 1.0 Type Library
shown in tools >> references? Is it selected? – TropologySet aSkype = CreateObject("SKYPE4COMLib.Skype")
. Does that make a difference? – BalboaSet aSkype = CreateObject("Skype4COM.Skype")
(Notice the missing 'Lib') for late binding. – Balboaregsvr32 skype4com.dll
. – BalboaHKCR\WOW6432Node\CLSID\{830690FC-BF2F-47A6-AC2D-330BCB402664}\InprocServer32
has the default pathC:\PROGRA~2\COMMON~1\Skype\SKYPE4~1.DLL
and that it exists. – VicissitudeCreateObject("new:{830690FC-BF2F-47A6-AC2D-330BCB402664}")
– Vicissitudereg QUERY HKCR\WOW6432Node\CLSID\{830690FC-BF2F-47A6-AC2D-330BCB402664}\InprocServer32
from cmd or executeregedit
to view the registry. – Vicissitude