| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 
 | 'Déclaration API
Declare Function DialAnyPhoneNumber Lib "tapi32.dll" Alias "tapiRequestMakeCall" ( _
     ByVal strPhoneNumber As String, _
     ByVal strArg1 As String, _
     ByVal strArg2 As String, _
     ByVal strArg3 As String) As Long
 
 
Sub PlacePhoneCall(strTelephoneNumberToDial As String)
' -----------------------------------------------------------
' Author: Calvin Smith
' Environment(s): MS Access (32-bit) / Visual Basic (32-bit)
' *****************************************
' * Courtesy code from my CodeDisk© product
' *****************************************
' ---------------------------------------------------------
' Purpose: Example of how to place a phone call from VB / VBA code
' Accepts: strTelephoneNumberToDial as the valid phone number
' Returns: Nothing
' Example usage: PlacePhoneCall "1-800-555-5555"
' ----------------------------------------------------------------------------'
On Error GoTo ErrorHandling_Err
DialAnyPhoneNumber strTelephoneNumberToDial$, "", "", ""
ErrorHandling_Exit:
Exit Sub
ErrorHandling_Err:
If Err Then
    'Trap your error(s) here, if any!
    Resume ErrorHandling_Exit
End If
End Sub
'------------------------------------
Sub Appel()
 
PlacePhoneCall "7777777777"
End Sub
'------------------------------------ | 
Partager