You can actually simplify things quite a bit here - the trouble with coding by example, particularly for things like VBA where things have evolved so much over the years, is that many of the highest ranked examples on Google are well out of date (they’re high ranked simply because they’ve been around for longer and therefore have more people linking to them).
XMLHTTPRequest has a
responseXML property that gives you the parsed XML response as a DOM document, then you can use
SelectNodes to find the bits you’re interested in with XPath:
XMLHttp.Open "POST", "https://api.quickfile.co.uk/xml", False
XMLHttp.setRequestHeader "Content-Type", "application/xml"
If (XMLHttp.readyState = 4) Then
InvoiceID = XMLHttp.responseXML.SelectSingleNode("/Invoice_Create/Body/InvoiceID").Text
InvoiceNum = XMLHttp.responseXML.SelectSingleNode("/Invoice_Create/Body/InvoiceNumber").Text
SelectedButton = MsgBox "Created estimate " & InvoiceNum & ", open in QuickFile?", vbYesNo
If (SelectedButton = vbYes) Then
Shell("rundll32 url.dll,FileProtocolHandler ""https://mybusiness.quickfile.co.uk/sales/preview?invoiceID=" & InvoiceID & """")
(NB I’ve also corrected your initial POST, which should be
application/xml rather than