A
anders
I'm trying to get this script to work in excel XP, with
Win XP and Tapi 3.0 dialer. Everything works out fine,
except for the dialer actually dialing the number. I
don't know the shortcut key for dialing, and "%d" (ALT-d)
doesn't do the trick. Any suggstions?
See script below:
Sub CellToDialer()
' Transfers active cell contents to Dialer
' And then dials the phone
' Get the phone number
CellContents = ActiveCell.Value
If CellContents = "" Then
MsgBox "Select a cell that contains a phone
number."
Exit Sub
End If
' Activate (or start) Dialer
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
' Transfer cell contents to Dialer
Application.SendKeys "%n" & CellContents, True
' Click Dial button
Application.SendKeys "%d"
' Application.SendKeys "{TAB}~", True
End Sub
John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss
Win XP and Tapi 3.0 dialer. Everything works out fine,
except for the dialer actually dialing the number. I
don't know the shortcut key for dialing, and "%d" (ALT-d)
doesn't do the trick. Any suggstions?
See script below:
Sub CellToDialer()
' Transfers active cell contents to Dialer
' And then dials the phone
' Get the phone number
CellContents = ActiveCell.Value
If CellContents = "" Then
MsgBox "Select a cell that contains a phone
number."
Exit Sub
End If
' Activate (or start) Dialer
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
' Transfer cell contents to Dialer
Application.SendKeys "%n" & CellContents, True
' Click Dial button
Application.SendKeys "%d"
' Application.SendKeys "{TAB}~", True
End Sub
John Walkenbach
For Excel tips, macros, & downloads...
http://j-walk.com/ss