J
John
Greetings and Merry Christmas!
I am looking for some references and code samples to access TAPI.
Here are the functions I want to find out about.
I am looking for how to Disconnect a call (using TAPI)
How to count the number of rings (is this possible?) and display how many
rings have occurred since dialing.
I would "like" to use excel as the only app I need to use (instead of
switching to dialer to end call). I am trying to make a PIM that I can
customize.
I would alos like to trap "Caller ID" info if possible!
I have not been able to find this info...
I am currently using Phone Dialer 1.50. as my access to tapi.
I am using Excel 2002 and Win XP
Here is my code for making the call:
Option Explicit
Declare Function tapiRequestMakeCall Lib "tapi32.dll" _
(ByVal stNumber As String, ByVal stDummy1 As String, _
ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2
Public Const MB_OKCANCEL = 1
Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
Function DialNumber(PhoneNumber, Optional vName As Variant)
Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String
Dim RetVal As Long
' Ask the user to pick up the phone.
Msg = "Please pickup the phone and click OK to dial " _
& Chr(13) & Chr(13) & PhoneNumber & " " & vName
RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "")
If RetVal < 0 Then
Msg = "Unable to dial number " & PhoneNumber
GoTo Err_DialNumber
End If
Exit Function
Err_DialNumber: 'This is not an On Error routine.
Msg = Msg & Chr(13) & Chr(13) & _
"Make sure no other devices are using the Com port"
End Function
I am looking for some references and code samples to access TAPI.
Here are the functions I want to find out about.
I am looking for how to Disconnect a call (using TAPI)
How to count the number of rings (is this possible?) and display how many
rings have occurred since dialing.
I would "like" to use excel as the only app I need to use (instead of
switching to dialer to end call). I am trying to make a PIM that I can
customize.
I would alos like to trap "Caller ID" info if possible!
I have not been able to find this info...
I am currently using Phone Dialer 1.50. as my access to tapi.
I am using Excel 2002 and Win XP
Here is my code for making the call:
Option Explicit
Declare Function tapiRequestMakeCall Lib "tapi32.dll" _
(ByVal stNumber As String, ByVal stDummy1 As String, _
ByVal stDummy2 As String, ByVal stDummy3 As String) As Long
Public Const ID_CANCEL = 2
Public Const MB_OKCANCEL = 1
Public Const MB_ICONSTOP = 16, MB_ICONINFORMATION = 64
Function DialNumber(PhoneNumber, Optional vName As Variant)
Dim Msg As String, MsgBoxType As Integer, MsgBoxTitle As String
Dim RetVal As Long
' Ask the user to pick up the phone.
Msg = "Please pickup the phone and click OK to dial " _
& Chr(13) & Chr(13) & PhoneNumber & " " & vName
RetVal = tapiRequestMakeCall(PhoneNumber, "", vName, "")
If RetVal < 0 Then
Msg = "Unable to dial number " & PhoneNumber
GoTo Err_DialNumber
End If
Exit Function
Err_DialNumber: 'This is not an On Error routine.
Msg = Msg & Chr(13) & Chr(13) & _
"Make sure no other devices are using the Com port"
End Function