jmarier
Jul 28th, 2004, 03:35 PM
how do I capture the IE.document ogject if it has only an image file loaded.
Set IE = createobject("InternetExplorer.Application")
IE.Navigate sUrl
IE.Visible = True
Do Until IE.ReadyState = 4:WScript.Sleep 10 : Loop
now I need to save the file to the hard drive in the c:\test\ folder.
I tried and tried to get the data from the SRC tag but now I am just taking the whole InnerHTML and cutting out the image SRC data. If there is and easier way please let me know.
WebText = IE.Document.Body.InnerHTML
sdataend=InStrRev(WebText,".jpg")
sdatabeg=InStr(WebText,"src=")
WebText=Mid(WebText,sdatabeg+5,sdataend-sdatabeg-1)
IE.Navigate WebText
Set IE = createobject("InternetExplorer.Application")
IE.Navigate sUrl
IE.Visible = True
Do Until IE.ReadyState = 4:WScript.Sleep 10 : Loop
now I need to save the file to the hard drive in the c:\test\ folder.
I tried and tried to get the data from the SRC tag but now I am just taking the whole InnerHTML and cutting out the image SRC data. If there is and easier way please let me know.
WebText = IE.Document.Body.InnerHTML
sdataend=InStrRev(WebText,".jpg")
sdatabeg=InStr(WebText,"src=")
WebText=Mid(WebText,sdatabeg+5,sdataend-sdatabeg-1)
IE.Navigate WebText