Set field name with VBA?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mandanarchi
    New Member
    • Sep 2008
    • 90

    Set field name with VBA?

    I know Visual Basic and VBA aren't quite the same thing, but I'm having no luck anywhere else.

    [code=vba]
    Set myHTTP = CreateObject("m sxml2.xmlhttp")
    Set myDom = CreateObject("M SXML2.DOMDocume nt")
    myDom.async = False
    myDom.Load (myxml)
    myHTTP.Open "POST", "<--website removed-->", False
    myHTTP.send (myDom.xml)
    [/code]

    I've been using this code for a while, and it works fine.
    'myxml' is an xml document created on the fly, which is fine; that works.

    One of our suppliers requires data to be POSTed to them, with the field name set to 'xmlmsg' and sent as 'multipart/form-data'.
    I'm sure there's got to be a way I can set this using VBA.

    I know of the [myHTTP.SetReque stHeader "name", "value"] code, but it doesn't seem to work. I think I might just be putting the wrong details.
    I think I tried
    Code:
    "Content-Type", "multipart/form-data; boundary = " & boundary
    "Content-Disposition", "name; 'xmlmsg'"
    But I just got errors.

    I've hunted and found plenty on headers, but nothing relating to VBA.
    Does anyone know, or know of a place I can find the info I'm looking for?

    Thanks
    Mandi
Working...