

' Call Skype_MakeCall("LittleBubba") 'Standard phone call

' Call Skype_MakeCall("5555555555") 'Standard phone call ' bVideoCall : True/False whether to make a video call ' sNo : Phone number to call / Can also be the name of a Skype contact ' Req'd Refs: Late Binding -> none required ' Copyright : The following is release as Attribution-ShareAlike 4.0 International ' Purpose : Initiate Skype to make a phone call ' Author : Daniel Pineault, CARDA Consultants Inc. , vbOKOnly + vbCritical, "An Error has Occured!" End If Resume Error_Handler_Exit Switch(Erl = 0, "", Erl 0, vbCrLf & "Line No: " & Erl) _ "Error Description: " & Err.Description & _

"Error Source: Skype_MakeCall" & vbCrLf & _
:max_bytes(150000):strip_icc()/001-add-contacts-on-skype-4173261-d6af4d6e049a438aafccfbb4d66498ee.jpg)
"Error Number: " & Err.Number & vbCrLf & _ MsgBox "The following error has occured" & vbCrLf & vbCrLf & _ MsgBox "Skype was not found.", vbCritical Or vbOKOnly, "Unable to Make Skype Call" Else 'Other errors If Err.Number = -2147024894 Then 'Skype not found SCmd = "" "" & sSkypeExe & "" " -_=" "skype:" & sNo & "?call" "" If bVideoCall = True Then sCmd = Replace(sCmd, "?call", "?call&video=true") SSkypeExe = CreateObject( "WScript.Shell").RegRead(sRegKey) ' Website : ' Purpose : Initiate Skype to make a phone call ' Copyright : The following is release as Attribution-ShareAlike 4.0 International ' (CC BY-SA 4.0) - ' Req'd Refs: Late Binding -> none required ' ' Input Variables: ' ~~~~~~~~~~~~~~~~ ' sNo : Phone number to call / Can also be the name of a Skype contact ' bVideoCall : True/False whether to make a video call ' ' Usage: ' ~~~~~~ ' Call Skype_MakeCall("5555555555") 'Standard phone call ' Call Skype_MakeCall("LittleBubba") 'Standard phone call ' Call Skype_MakeCall("5555555555", False) 'Standard phone call ' Call Skype_MakeCall("5555555555", True) 'Video phone call ' ' Revision History: ' Rev Date(yyyy-mm-dd) Description ' ************************************************************************************** ' 1 Initial Public Release '- Public Function Skype_MakeCall(sNo As String, Optional bVideoCall As Boolean = False) As Boolean On Error GoTo Error_Handlerĭim sSkypeExe As String Dim sCmd As StringĬonst sRegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\skype.EXE\" '- ' Procedure : Skype_MakeCall ' Author : Daniel Pineault, CARDA Consultants Inc.
