I am trying to send a Skype message to a group of people using VBA. the below code should in theory work but I have the below error message : User-Defined type not defined for aSkype As SKYPE4COMLib.Skype
any idea ? I was wondering if this was a permission issue ?
Many thanks all
Sub Test()
Dim aSkype As SKYPE4COMLib.Skype
Set aSkype = New SKYPE4COMLib.Skype
Dim oChat As Chat
Dim skUser As SKYPE4COMLib.User
Set oMembers = CreateObject("Skype4COM.UserCollection")
oMembers.Add (oSkype.User("user_name1"))
oMembers.Add (oSkype.User("user_name2"))
Set oChat = oSkype.CreateChatMultiple(oMembers)
oChat.OpenWindow
oChat.Topic = "Group Chat Topic"
oChat.SendMessage "automated message"
End Sub