Here's an example from one of my own apps. This code requires a reference
(Tools, References in the VBA IDE) to Microsoft XML version 2.6 or later.
Look for msxml2.dll, msxml3.dll, or msxml4.dll in the Windows\System32
folder. Don't try to use this code with version 2.0 or earlier, the syntax
is different. Don't use version 5 if you plan to distribute the app to other
users. Version 5 is installed by Office 2003 and is not redistributable. I'm
not sure about version 6, it seems to be installed by SQL Server 2005, I'm
not sure whether it is redistributable or not. The latest redistributable
I've been able to find so far is this one for version 4 ...
http://www.microsoft.com/downloads/...2b-b4f2-46da-b4b6-c5d7485f2b42&displaylang=en
And here's the code ...
Dim objRequest As MSXML2.XMLHTTP
Dim objDocument As MSXML2.DOMDocument
Set objRequest = New MSXML2.XMLHTTP
Set objDocument = New MSXML2.DOMDocument
'You might want to change False to True in this line if
'you don't expect a response from the target
objDocument.async = False
objDocument.Load CurrentProject.Path & "\NEWB.XML"
'You can use this for testing if you want. It doesn't process or store
the XML in
'any way, it just sends back the text 'I hear you'. It's just somethign
I used during
'my own testing. Of course, I make no guarantee as to its continued
availability
'and while I personally do not look at or store any data sent to that
page, I
'accept no responsibility if anyone sends sensitive data.
objRequest.Open "POST", "
http://brenreyn.brinkster.net/targetpage.asp",
False
objRequest.send objDocument.xml
MsgBox objRequest.responseText, , "Response"