Sub Dialer() ' Ctrl-j activates ' Warren Hall 11/19/2016
' Transfers active cell contents to Dialer, then dials the phone
' through the STANDARD modem via dialer.exe which has been configured one-time,
' setting the area code, 8-n-1 comm3, easy peasy stuff.
' PROBLEM - THIS SUB ONLY WORKS THE FIRST TIME
' SENDKEYS ONLY SEEMS TO WORK THE FIRST TIME
' A second option is to insert this formula into a column of phone.xlsm:
' =HYPERLINK("file:c:\windows\system32\dialer.exe","Click to call "&D128) which
' brings up the dialer very nicely but I can't fathom how to pipe the number]
' to be dialed into the app automatically.
' a nine line module and I can't find the problem... drat. Please HELP!
Dim myAppID As Integer
Dim phoneNbr As String
phoneNbr = ActiveCell.Value
' Now, activate and gain focus for Phone Dialer in normal window.
' the following path MAY need to be changed for your environment.
myAppID = Shell("c:\windows\system32\Dialer.exe", 1)
AppActivate myAppID ' Activate Phone Dialer.
' Send these keystrokes to Dialer where Alt is shown as "%".
Application.SendKeys "%n" & phoneNbr, True ' Nbr to dial + tel nr.
Application.SendKeys "%d", True ' dial it.
' Hang up and exit the dialer.
Application.SendKeys "%f", True ' File.
Application.SendKeys "%x", True ' Exit.
End Sub