Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to get html from browser, not working

Status
Not open for further replies.

hinchdog

Programmer
Feb 14, 2001
380
US
Does anyone see a problem with this code, cause it aint working. I'm trying to grad the html from a browser I opened a write it to a text file.

I have references to Internet Controls

Here it is.....

Set IE = New SHDocVw.InternetExplorer
IE.Visible = False
IE.Navigate (" Dim doc, shl
Set doc = IE.Document

Dim fs, F, ts
Set fs = CreateObject("Scripting.FileSystemObject")
fs.CreateTextFile "/windows/temp/parsein.tmp"
Set F = fs.GetFile("/windows/temp/parsein.tmp")
Set ts = F.OpenAsTextStream(2, -2)
ts.Write doc.documentElement.OutterHTML ***this isn't getting the html!!!!
 
I use the Web Browser control which gives greater control but there are similarities.

IE.Visible = False
When I tried to run the Web Browser control (I know you are using IE)with Visible=false it stopped dead.

IE.Navigate ("IE (and the WB CTL) runs asynchronously i.e. it does not wait for a page to load before returning control to you. If you were using the WB CTL, you would capture HTML in the DocumentComplete Event.
 
that's great but i actually need to have the web browser hidden. i found this great code to do this using the wininet.dll here this works great for an .exe type project but i want to creat a .dll that pulls back html. i guess i could use the wininet.dll as is, but i don't know much about this. do you?
 
i don't know how to do that. could you quickly explain? i'm just getting started.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top