Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Why is ServerXMLHTTP send method returning an Automation Error?

$
0
0

I am wondering if someone can reproduce this on their system: the function shown below works fine on Windows 7 running Office 2013 with IE11, but it generates an "Automation Error" atXMLhttp.send on another system running Windows 7 and Office 2010 and IE8. Is is an IE8 incompatibility issue with ServerXMLHTTP. Thanks in advance. 

Public Function getWiki(ByVal name As String) As String
  Dim XMLhttp: Set XMLhttp = CreateObject("MSXML2.ServerXMLHTTP")
  XMLhttp.setTimeouts 2000, 2000, 2000, 2000
  XMLhttp.Open "GET", "http://en.wikipedia.org/wiki/" & name, False
  XMLhttp.send

  If XMLhttp.Status = 200 Then
    getWiki = XMLhttp.responseText
  Else
    getWiki = ""
  End If
End Function


Viewing all articles
Browse latest Browse all 935

Trending Articles