0

可能重复:
使用 VBA 从 Word 发送 http 请求

如何在(vb mac office excel 2011)中发送 HTTP Post,并读取 HTTP 响应?请提供明确的答案,我是vb的新手。

不是 Windows Office,Mac Office 2011 !

提前致谢 !

4

1 回答 1

-1

这是2010 年回答的类似问题的链接。此处粘贴的代码来自该链接。

Sub http()
Dim MyRequest As Object

    Set MyRequest = CreateObject("WinHttp.WinHttpRequest.5.1")
    MyRequest.Open "GET", "http://www.google.com"

    ' Send Request.
    MyRequest.Send

    'And we get this response
    MsgBox MyRequest.ResponseText

End Sub

如果您还需要更多建议,请告诉我。

于 2012-10-11T13:54:21.330 回答