I submitted a question yesterday w/title Excel vba to get IE source. I had a working
solution using MSXLM2.XMLHTTP to read the source without opening IE (or FireFox).
The site did an upgrade so now the source received indicates the requested page
requires an up-to-date viewer. So, as an alternate to yesterday’s question, can this
be changed so as to fake the source to appear as submitted by Firefox?
Public Sub ShowHTML(ByVal strURL) ‘Copied from http://stackoverflow.com/questions/2520949/getting-html-source-with-excel-vba On Error GoTo ErrorHandler Dim strError As String strError = “” Dim oXMLHTTP As MSXML2.XMLHTTP Set oXMLHTTP = New MSXML2.XMLHTTP strResponse = “” With oXMLHTTP .Open “GET”, strURL, False .sEnd “” … strResponse = .responseText …
Open has the following arguments:
Sub open(bstrMethod As String, bstrUrl As String, [varAsync], [bstrUser], [bstrPassword])
There is also
Sub setRequestHeader(bstrHeader As String, bstrValue As String)
that might be helpful.