|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
webbrowser objectI use "WebBrowser" object to browse html and want to save it (ref following
code). But I want the system to write file automatically without "Prompt for Save" dialog. How to do it? Thx. With WebBrowser .Navigate2 (sURL) Do While .ReadyState <> READYSTATE_COMPLETE Sleep (1000) DoEvents Loop If .ReadyState = READYSTATE_COMPLETE Then WebBrowser.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER End If End With > I use "WebBrowser" object to browse html and want to save it (ref following <code snipped>> code). But I want the system to write file automatically without "Prompt for > Save" dialog. How to do it? Thx. You may want to try replacing OLECMDEXECOPT_PROMPTUSER with OLECMDEXECOPT_DONTPROMPTUSER, then add another parameter on the end which specifies the filename to save to as documented here: http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/reference/methods/execwb.asp Hope this helps, Mike - Microsoft Visual Basic MVP - E-Mail: ED***@mvps.org WWW: Http://EDais.mvps.org/ |
|||||||||||||||||||||||