views:

313

answers:

0

The following late bound code in Word VBA macro will prompt with a credentials dialag, but for the same late bound code in vbscript (say a .vbs or outlook form) an "Access denied" error is issued on send instead.

urlBasic = "http://myserver/mybasicauth/"
set xhr = CreateObject("MSXML2.XMLHTTP.6.0")
xhr.Open "GET", urlBasic , false 
xhr.send 
token = xhr.getResponseHeader("myToken")

What difference is there in the host apps that causes XMLHTTP to behave differently? I don't beleive this is a cross-domain issue.

For the record I actually want the credentials dialog behaviour in vbscript.

regards Phil