Вариант другого ответа работает для меня без необходимости в IE.
Sub Post_HTTP_Form()
'Requires reference to "Microsoft XML, v6.0" or better. (Tools>References)
Dim msXML As New XMLHTTP60, resp As String
With msXML
.Open "POST", "{http://YOUR_URL_HERE.com}", False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.Send "{PARAMETER}={VALUE}"
resp = StrConv(.responseBody, vbUnicode)
End With
Debug.Print resp 'outputs to Immediate Window (CTRL+G to view)
Set msXML = Nothing
End Sub
Просто замените три значения в {фигурных скобках}.
... и поздняя версия версия:
Sub Post_HTTP_Form()
Dim msXML As Object, resp As String
Set msXML = CreateObject("MSXML2.ServerXMLHTTP")
With msXML
.Open "POST", "{http://YOUR_URL_HERE.com}", False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.Send "{PARAMETER}={VALUE}"
resp = StrConv(.responseBody, vbUnicode)
End With
Debug.Print resp 'outputs to Immediate Window (CTRL+G to view)
Set msXML = Nothing
End Sub