pkresge
asked on
saving page using OLECMDID_SAVE in webbrowser control
I am creating a control that downloads a web page. I use webbrowser control to do this job. When the download of the page is completed, I would like to automatically save this page in a directory specified. I tried to use following command: WebBrowser1.ExecWB OLECMDID_SAVE, OLECMDEXECOPT_DONTPROMPTUS ER, "c:\temp"
This didn't work. Only way I can get any kind of Save is using OLECMDID_SAVEAS. Is this possbile using VB? Or do I need to look at VC++?
This didn't work. Only way I can get any kind of Save is using OLECMDID_SAVEAS. Is this possbile using VB? Or do I need to look at VC++?
ASKER
Even after I gave focus to the webbrowser control( MS Article ID: Q176400 ) the method didn't save the page. Now I am looking at automating OLECMDID_SAVEAS with dialog window. Is there a better way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Bought This Question.
Alot of problems have came out with WebBrowser1.ExecWB method.
However, you code is okay, you just need to give the
WebBrowser Object the focus.
Not as easy as it sounds,
the setfocus will not also work.
Right now, your button that calls WebBrowser1.ExecWB has the focus.