Function XmlDoc(strFile) 'Returns an xml document root node Dim xml, node 'Create XML object On Error Resume Next Set xml = Nothing If xml Is Nothing Then Set xml = CreateObject("Msxml2.DOMDocument.4.0") If xml Is Nothing Then Set xml = CreateObject("Msxml2.DOMDocument") If xml Is Nothing Then Set xml = CreateObject("Msxml2.XMLDocument") If xml Is Nothing Then Set xml = CreateObject("Msxml.DOMDocument") If xml Is Nothing Then Set xml = CreateObject("Microsoft.XMLDOM") On Error Goto 0 If Not xml Is Nothing Then xml.async = False If Not xml.load(strFile) Then Set xml = Nothing End If End If Set XmlDoc = xml End Function