• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to Dial out from PC using voip cisco ip phone

IKHAN

Member
Hello,

Working on spreadsheet to dial out number using a macro, So far have been able to bring the dialer up and prompt to enter number.

Need help to complete the code , see attached file

Basically, Require to dial number out by pressing macro button from spreadsheet. Manual dialout method is

9 647 xxx xxx wait then press accesscode followed by # ( xxxxxxx # ) wait then input asterix " * " followed by pin"xxxx"

so it will be 9 647 xxx xxxx ,,,8823xxx # and if person host press * xxxx

would be fantastic if input boxes pop up with options to enter numbers and click OK to dial.

Code:
Sub Numeric_RangeDataType()
Dim vData
    On Error Resume Next

        Application.DisplayAlerts = False

            vData = Application.InputBox _
            (Prompt:="Enter Number to Dial, " _
            & "or enter the number directly.", _
            Title:="Technical Bridge 1", Type:=1 + 8)      

    On Error GoTo 0

        Application.DisplayAlerts = True

    If IsNumeric(vData) And vData <> 0 Then

Call DialOut

          Else
      Exit Sub
    End If
End Sub

Sub DialOut()
Dim strDial As String
Dim intReturn As Long
strDial = ActiveCell.EntireRow.Columns("B").Value
intReturn = Shell("C:\Program Files\Cisco Systems\Cisco IP Communicator\communicatork9.exe", 1)
Application.SendKeys (strDial & "%d")
End Sub
 

Attachments

  • testdial out.xlsm
    21.2 KB · Views: 18
Last edited:
Obviously not having a Cisco system at home I cannot test this but i would structure my code as below:

Code:
Sub Numeric_RangeDataType()
Dim vData
Dim myNo As String
On Error Resume Next

  Application.DisplayAlerts = False

  vData = Application.InputBox _
  (Prompt:="Enter Number to Dial, " _
  & "or enter the number directly.", _
  Title:="Technical Bridge 1", Type:=1 + 8)

  On Error GoTo 0

  Application.DisplayAlerts = True

  If IsNumeric(vData) And vData <> 0 Then

  myNo = "9 647 " + Cstr(vData) + " ,,,8823xxx #"
 
  DialOut(myNo)

  Else
  Exit Sub
  End If
End Sub

Code:
Function DialOut(myNo As String)
'Dim strDial As String
Dim intReturn As Long
'strDial = ActiveCell.EntireRow.Columns("B").Value
intReturn = Shell("C:\Program Files\Cisco Systems\Cisco IP Communicator\communicatork9.exe", 1)
Application.SendKeys (myNo & "%d")
End Function
 
Made few changes to the code provided, Removed input box.However not sure how to give a break or wait after dialling primary number and wait for 10 sec before dialling the access code " 4444#" and then wait 10 sec again and dial the pin " *222" thru below code.

Code:
Sub Numeric_RangeDataType()

Dim myNo As String

On Error Resume Next

  Application.DisplayAlerts = False
 
  On Error GoTo 0

  Application.DisplayAlerts = True

  myNo = "9416xxx0000" 

  DialOut (myNo)   

End Sub

Function DialOut(myNo As String)
Dim intReturn As Long
intReturn = Shell("C:\Program Files\Cisco Systems\Cisco IP Communicator\communicatork9.exe", 1)
Application.SendKeys (myNo & "%d")
SendKeys "{ENTER}"
End Function
 
I would experiment with pauses typically entered as commas
You may need to add several of them to get the correct length of time
 
Back
Top