Having Excel dial the phone, one key at a time : Shell « Windows API « VBA / Excel / Access / Word






Having Excel dial the phone, one key at a time

 
      
Sub CellToDialer()
    Appname = "Dialer"
    AppFile = "Dialer.exe"
    On Error Resume Next
    AppActivate (Appname)
    If Err <> 0 Then
        Err = 0
        TaskID = Shell(AppFile, 1)
        If Err <> 0 Then MsgBox "Can't start " & AppFile
    End If
    Application.SendKeys "%n" & "123-1234123123-1234123", True
    Application.SendKeys "%d"
End Sub

 








Related examples in the same category

1.Creates a text files and saves it
2.Returning the Task ID of the Started Application
3.SendKeys to another application
4.Starting Another Application
5.Using VBA to Program Open XML Files