rye004
asked on
C# and Internet Explorer Automation
I have a web page that I am loading into Internet Explorer. I am then trying to do a “Save As” to HTML via Automation. I have been searching for a couple days and I can’t figure out how to do this.
I have been trying to do this with Microsoft.mshtml and SHDocVw in Visual Studio.
Any direction would be greatly appreciated.
I have been trying to do this with Microsoft.mshtml and SHDocVw in Visual Studio.
Any direction would be greatly appreciated.
ASKER
Thank you kalpesh2804 for your response.
I did originally try “webBrowser1.Document.Body .InnerHtml ”.
However it only gets the HTML from when the page was loaded.
With the “Save As” in IE it does a conversion process to save the HTML – which is what I am looking for. If you take a website like “yahoo.com”, more content is added the more you scroll down. If you do “InnerHtml”, it only gets the HTML that was loaded with the page. However if you do a “Save As”, it does a conversion to view it later.
Hopefully this make sense.
I did originally try “webBrowser1.Document.Body
However it only gets the HTML from when the page was loaded.
With the “Save As” in IE it does a conversion process to save the HTML – which is what I am looking for. If you take a website like “yahoo.com”, more content is added the more you scroll down. If you do “InnerHtml”, it only gets the HTML that was loaded with the page. However if you do a “Save As”, it does a conversion to view it later.
Hopefully this make sense.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No better reason was given.
Open in new window
or
you can try browser automation like below
Open in new window
you can save cDoc in html File.