Mega Code Archive

 
Categories / VisualBasic Script / Windows API
 

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