abbaddon223
Registered User.
- Local time
- Today, 07:13
- Joined
- Mar 13, 2010
- Messages
- 162
[FONT="]Hi,[/FONT]
[FONT="][/FONT]
[FONT="]I'm hoping there's an expert out there.....
[/FONT]
[FONT="]I have some VBA coding that is allowing me to place a VOIP call via a SIP provider. All works fine. What I'm looking for is an extra bit that can cancel the call when prompted (command button macro say).[/FONT]
[FONT="][/FONT]
[FONT="]The coding is below - thanks in advance for any help. Sincerely yours: stuck.
[/FONT]
[FONT="]
[/FONT]
[FONT="]Private Sub Command87_Click()[/FONT]
[FONT="] Dim ie As New InternetExplorer[/FONT]
[FONT="] Dim htmldoc As HTMLDocument[/FONT]
[FONT="] Dim number As String[/FONT]
[FONT="] Dim res As String[/FONT]
[FONT="] Dim contact_name As String[/FONT]
[FONT="] Dim agent As String[/FONT]
[FONT="] Dim extension As String[/FONT]
[FONT="] Dim url As String[/FONT]
[FONT="] Dim acct, pass As String[/FONT]
[FONT="] [/FONT]
[FONT="] agent = Form_Frm_User_Select.Combo_UserSelect.Value[/FONT]
[FONT="] Select Case agent[/FONT]
[FONT="] Case "Name"[/FONT]
[FONT="] extension = "001"[/FONT]
[FONT="] acct = "Business001"[/FONT]
[FONT="] pass = "Password"[/FONT]
[FONT="] [/FONT]
[FONT="][/FONT][FONT="] End Select[/FONT]
[FONT="] [/FONT]
[FONT="] number = Replace(Me.ContactNumber, " ", "")[/FONT]
[FONT="] number = Replace(number, "-", "")[/FONT]
[FONT="] contact_name = Me.ContactName[/FONT]
[FONT="] url = "http://contact-pro6.co.uk/callapi/251/Call/MakeCall?" + _[/FONT]
[FONT="] "Account=" & acct & _[/FONT]
[FONT="] "&PassPlain=" & pass & _[/FONT]
[FONT="] "&ExtensionAccount=0367*" + extension + _[/FONT]
[FONT="] "&FromNumber[]=0367*" + extension + _[/FONT]
[FONT="] "&PhoneNumberToCall=" + number + _[/FONT]
[FONT="] "&CallerIDName=" + contact_name + _[/FONT]
[FONT="] "&CallerIDNumber=" + number[/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT]
[FONT="] ie.Visible = False[/FONT]
[FONT="] ie.navigate url[/FONT]
[FONT="] Do[/FONT]
[FONT="] DoEvents[/FONT]
[FONT="] Loop Until ie.readyState = READYSTATE_COMPLETE[/FONT]
[FONT="] Set htmldoc = ie.Document[/FONT]
[FONT="] 'do some debug with the result in the HTMLDoc.[/FONT]
[FONT="] 'res = htmldoc.documentElement.innerHTML[/FONT]
[FONT="] 'Debug.Print (res)[/FONT]
[FONT="] ie.Quit[/FONT]
[FONT="] [CallStart].Value = Time()[/FONT]
[FONT="] [/FONT]
[FONT="]End Sub[/FONT]
[FONT="][/FONT]
[FONT="]I'm hoping there's an expert out there.....
[/FONT]
[FONT="]I have some VBA coding that is allowing me to place a VOIP call via a SIP provider. All works fine. What I'm looking for is an extra bit that can cancel the call when prompted (command button macro say).[/FONT]
[FONT="][/FONT]
[FONT="]The coding is below - thanks in advance for any help. Sincerely yours: stuck.
[/FONT]
[FONT="]
[/FONT]
[FONT="]Private Sub Command87_Click()[/FONT]
[FONT="] Dim ie As New InternetExplorer[/FONT]
[FONT="] Dim htmldoc As HTMLDocument[/FONT]
[FONT="] Dim number As String[/FONT]
[FONT="] Dim res As String[/FONT]
[FONT="] Dim contact_name As String[/FONT]
[FONT="] Dim agent As String[/FONT]
[FONT="] Dim extension As String[/FONT]
[FONT="] Dim url As String[/FONT]
[FONT="] Dim acct, pass As String[/FONT]
[FONT="] [/FONT]
[FONT="] agent = Form_Frm_User_Select.Combo_UserSelect.Value[/FONT]
[FONT="] Select Case agent[/FONT]
[FONT="] Case "Name"[/FONT]
[FONT="] extension = "001"[/FONT]
[FONT="] acct = "Business001"[/FONT]
[FONT="] pass = "Password"[/FONT]
[FONT="] [/FONT]
[FONT="][/FONT][FONT="] End Select[/FONT]
[FONT="] [/FONT]
[FONT="] number = Replace(Me.ContactNumber, " ", "")[/FONT]
[FONT="] number = Replace(number, "-", "")[/FONT]
[FONT="] contact_name = Me.ContactName[/FONT]
[FONT="] url = "http://contact-pro6.co.uk/callapi/251/Call/MakeCall?" + _[/FONT]
[FONT="] "Account=" & acct & _[/FONT]
[FONT="] "&PassPlain=" & pass & _[/FONT]
[FONT="] "&ExtensionAccount=0367*" + extension + _[/FONT]
[FONT="] "&FromNumber[]=0367*" + extension + _[/FONT]
[FONT="] "&PhoneNumberToCall=" + number + _[/FONT]
[FONT="] "&CallerIDName=" + contact_name + _[/FONT]
[FONT="] "&CallerIDNumber=" + number[/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT]
[FONT="] ie.Visible = False[/FONT]
[FONT="] ie.navigate url[/FONT]
[FONT="] Do[/FONT]
[FONT="] DoEvents[/FONT]
[FONT="] Loop Until ie.readyState = READYSTATE_COMPLETE[/FONT]
[FONT="] Set htmldoc = ie.Document[/FONT]
[FONT="] 'do some debug with the result in the HTMLDoc.[/FONT]
[FONT="] 'res = htmldoc.documentElement.innerHTML[/FONT]
[FONT="] 'Debug.Print (res)[/FONT]
[FONT="] ie.Quit[/FONT]
[FONT="] [CallStart].Value = Time()[/FONT]
[FONT="] [/FONT]
[FONT="]End Sub[/FONT]