Set http = CreateObject("MSXML2.XMLHTTP") strURL = "https://finance.yahoo.com/quote/^GSPC/history" http.Open "GET", strURL, False http.Send Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("C:\Users\AHS\Desktop\HTML_SUMMARY.txt", True) a.WriteLine(http.responseText) Result in error: BASIC runtime error. An exception occurred Type: com.sun.star.lang.WrappedTargetRuntimeException Message: [automation bridge] unexpected exception in IUnknownWrapper::invoke ! Message : [automation bridge]: at C:/cygwin64/home/buildslave/source/libo-core/extensions/source/ole/oleobjw.cxx:2060 at C:/cygwin64/home/buildslave/source/libo-core/extensions/source/ole/oleobjw.cxx:250. Substituting a static string for http.responseText works fine.