The below code dials a phone number when the subform datasheet cell
containing the number is double clicked. The problem is that the dialer
application (c:\windows\dia ler.exe) pops up windows on the screen, requiring
user intervention to click "Talk" or "Hang Up". I want to customize the
behavior of the application so that no pop ups are received and the
application drops the line automatically and closes itself in 6 seconds -
which is enough time for the user to pick up the phone. The user will hear
the modem dial, but no other screen alerts will be received. If the phone
is not picked up with the 6-second window, the call is simply dropped.
Perhaps I need to write my own custom version of TAPI32.DLL? Or is there a
way to customize the behavior of this code to suit my needs? I've created
my own DLLs in the past, though am still somewhat of a novice.
[Form_frm0Teleph one]
Option Compare Database
Option Explicit
Private Declare Function tapiRequestMake Call Lib "TAPI32.DLL " _
(ByVal DestAddress As String, ByVal AppName As String, _
ByVal CalledParty As String, ByVal Comment As String) As Long
Private Sub Telephone_Numbe rs_DblClick(Can cel As Integer)
Dim lngRetVal As Long
Dim strDial As String
strDial = Forms!frm0!frm0 Telephone.Form! TelNumber
lngRetVal = tapiRequestMake Call(Trim$(strD ial), "", "", "")
End Sub
Thanks in advance.
PS. thanks to Bruce Thompson and Joacim Andersson for help getting this far.
containing the number is double clicked. The problem is that the dialer
application (c:\windows\dia ler.exe) pops up windows on the screen, requiring
user intervention to click "Talk" or "Hang Up". I want to customize the
behavior of the application so that no pop ups are received and the
application drops the line automatically and closes itself in 6 seconds -
which is enough time for the user to pick up the phone. The user will hear
the modem dial, but no other screen alerts will be received. If the phone
is not picked up with the 6-second window, the call is simply dropped.
Perhaps I need to write my own custom version of TAPI32.DLL? Or is there a
way to customize the behavior of this code to suit my needs? I've created
my own DLLs in the past, though am still somewhat of a novice.
[Form_frm0Teleph one]
Option Compare Database
Option Explicit
Private Declare Function tapiRequestMake Call Lib "TAPI32.DLL " _
(ByVal DestAddress As String, ByVal AppName As String, _
ByVal CalledParty As String, ByVal Comment As String) As Long
Private Sub Telephone_Numbe rs_DblClick(Can cel As Integer)
Dim lngRetVal As Long
Dim strDial As String
strDial = Forms!frm0!frm0 Telephone.Form! TelNumber
lngRetVal = tapiRequestMake Call(Trim$(strD ial), "", "", "")
End Sub
Thanks in advance.
PS. thanks to Bruce Thompson and Joacim Andersson for help getting this far.
Comment