Click to See Complete Forum and Search --> : Using menu bar item of IE from programmer
Terence
Mar 17th, 2001, 08:31 PM
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.
WebBrowser1.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER
Terence
Mar 26th, 2001, 03:05 AM
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.