Sending Data from Visio with HTTP Post

Started by DJozef87, December 27, 2011, 05:15:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DJozef87

Hi Guys,

How can I send data from Visio with HTTP Post in VBA ?

I use a ShellExecute function to open a website with the default browser from Visio, and I want to send data using post method.

I know that using IE we can do this

Set xmlhttp = CreateObject("microsoft.xmlhttp")

    With xmlhttp
        .Open "POST", " http://myURL/", False
        .setrequestheader "Content-Type", "application/x-www-form-urlencoded"
        .send Data
        Debug.Print .responsetext
    End With


but I actually open my default browser (Firefox) with this function

BrowserOpen("http://myURL")

Function BrowserOpen(sURL As String) As Boolean
  Dim lRet As Long
  lRet = ShellExecute(GetActiveWindow, vbNullString, sURL, vbNullString,vbNullString,1)
  If lRet > 32 Then
        BrowserOpen = True
  Else
        BrowserOpen = False
        Debug.Print "Error Number: " & Err.LastDllError
  End If
End Function

Thanks in advance

Browser ID: smf (is_webkit)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 135 (show)
Files included: 34 - 1317KB. (show)
Memory used: 1053KB.
Tokens: post-login.
Cache hits: 13: 0.00258s for 26,584 bytes (show)
Cache misses: 1: (show)
Queries used: 17.

[Show Queries]