
WebBrowser Ctl: save web page to local machine
As far as I know you can't state a path for where the file(s) will be
saved. The following line will give you a file save box to save all
the files (page and graphics etc)
WebBrowser1.ExecWB OLECMDID_SAVE, OLECMDEXECOPT_DODEFAULT, "", ""
If you want to save just the html of the page then use something like
WebBrowser1.Document.body.outerhtml
I hope that helps
Grant
Quote:
> Hi,
> The question is about the WebBrowser control. I intend to save a web page
> to my machine by trying the following command:
> Me.WebBrowser1.Navigate ("http://www.microsoft.com")
> WebBrowser1.ExecWB OLECMDID_SAVE, OLECMDEXECOPT_DODEFAULT,
> "c:\web\a.htm", ""
> However, all fail.
> Could you please give me a example ?
> Thanks in advance!
> Peter Lin