-
An application program can create an instance of Internet Explorer, browse to a site and access the HTML of web pages. But is it possible that the application simulates the action of clicking the File menu item to save the page to hard disk so that later we can double click the saved file to view its content ?
-
To save a page with the WebBrowser Control, this code should work.
Code:
WebBrowser1.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER
-
Matthew,
Thanks for your advice.
I tried the code and it prompted me to specify folder to save the page.
However, what I really needed was to run the program unattended. Therefore I changed the coding as follow :
IEObj.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DONTPROMPTUSER, "C:\test.html"
But the "DONTPROMPTUSER" did not work. The program asked me to select the folder to save the file. I suspected that I coded the pvaIn parameter wrongly. Could you please advise me how to code it ?
Thanks.
Terence