Link to home
Create AccountLog in
Avatar of etsellinc
etsellincFlag for United States of America

asked on

VB6 Web Browser Document Source

I have a form in VB6 that has the Web Browser object on it. I send the browser out to fetch a page. When it returns the results, I need to gt the source for the page from the browser object.

Something like this:

sResult = WebBrowser1.Document.Source

Can some help me with this problem. The returned page is all text which will be used by the program.

Thanks in advance.

Mark

ASKER CERTIFIED SOLUTION
Avatar of Robin Uijt
Robin Uijt
Flag of Netherlands image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of etsellinc

ASKER

I would prefer the full source. That works if there is no other solution though.

Thanks,

Mark
That depends on what you want to do with the html source of the page.

Otherwise it should be:

sResult = WebBrowser1.Document.body.InnerHTML
The actual return is a text file and not HTML. The code you supplied still works for that too.

Thanks very much for your help.

Mark