The subroutine below goes to the Comcast home page, captures the html as
text, locates the user's temp file and creates an htm file in the temp
folder with the contents from the Comcast page. Pictures and other linked
objects are not copied to this htm file so the appearance is quite different
than the actual web page but you may be able to use the html tags as
reference marks and extract the data to your Word document. When you
complete the operation, you would want to write a line to delete the
temporary htm file created to keep the junk in your temp folder limited.
Steve Yandl
Sub CheckWebPage()
On Error Resume Next
Const ForWriting = 2
strURL = "
http://www.comcast.net/comcast.html"
Set objHTTP = CreateObject("MSXML2.XMLHTTP")
objHTTP.Open "GET", strURL, False
objHTTP.Send
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Locate path to temp folder
tmpPath = objFSO.GetSpecialFolder(2)
' Create text file, SiteA.htm in Temp folder
Set objFile = objFSO.CreateTextFile(tmpPath & "\SiteA.htm", ForWriting)
objFile.Write objHTTP.ResponseText
objFile.Close
End Sub