exécuter .vbs pour composer numéro téléphone
Bonjour,
C'est la toute première fois que j'essaie d'utiliser un vbs dans un fichier créé en notepad.
Depuis une interface html, je voudrais appeler un bat afin qu'il m'exécute un vbs pour composer un numéro de téléphone via le driver TAPI.
Donc, dans un fichier .vbs, j'ai le script suivant que j'ai trouvé dans un forum :
Code:
1 2 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
'------------------------------------ |
Lorsque je double-clique sur mon fichier, j'obtiens un message d'erreur de syntaxe à la ligne 2, caractère 9, donc, pour moi, au niveau du F de Function.
Quelqu'un pourait-il m'aider à y voir plus clair?
Merci d'avance