Avatar of etsellinc
etsellinc
Flag 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

Visual Basic Classic

Avatar of undefined
Last Comment
etsellinc

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Robin

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
etsellinc

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

Thanks,

Mark
Robin

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

Otherwise it should be:

sResult = WebBrowser1.Document.body.InnerHTML
etsellinc

ASKER
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
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes