I am wondering why the response property of an MSXML2.ServerXMLHTTP object not returning the full html source. It appears it is only returning the "inner html". I can create an IE object and get the "outer html" but that is not too efficient since I have hundreds of search items.
I have the function shown below (with the URL) that assigns the HTML content to a string.
Sub test()
Dim myString As String
myString = getECICS2("103-90-2") ' myString only contains inner html
End Sub
Public Function getECICS(ByVal casNum As String) As String
Dim XMLhttp: Set XMLhttp = CreateObject("MSXML2.ServerXMLHTTP")
XMLhttp.setTimeouts 2000, 2000, 2000, 2000
XMLhttp.Open "GET", "http://ec.europa.eu/taxation_customs/dds2/ecics/chemicalsubstance_consultation.jsp?Lang=en&Cas=" & casNum & "&Cus=&CnCode=&EcCode=&UnCode=&Name=&LangNm=en&Inchi=&Characteristic=&sortOrder=1&Expand=true&offset=0&range=25", False
XMLhttp.send
If XMLhttp.Status = 200 Then
getECICS = XMLhttp.responseText
Else
getECICS = ""
End If
End Function
Thanks in advance
<html>tag.