
Saving HTML page from WebBrowser
Do you want to do this programmatically; that is, without user intervention?
I have searched and enquired extensively but in vain for an explanation of
those elusive optional parameters in the "ExecWB" Method. There is very
little documentation on this subject in MSDN, even for the C devotees.
I have concluded that it is one of those situations where functionality is
simply not available to us through the VB interface; one of those "the
architecture of the language" explanations, no doubt. I suspect that the
"pvaIn" parameter for OLECMDID_SAVEAS requires a "pidl" (pointer to an
ITEMIDLIST) which to the best of my knowledge can be used but not
constructed in VB. My compromise is to write the BODY of the HTML document
to a file:
"<HTML>" &...body.outerHTML & "</HTML>"
Of course, HTML pages tend to be so so "dynamic" now that simply saving the
HTML often isn't terribly useful; without images, scripts, etc.
I don't know much about the "Internet Transfer Control" (MSInet.ocx). There
are some tricky parameters relating to connections/proxies/timing etc, but I
understand that statements like
S = Inet1.OpenURL("http://...etc")
are possible, then the save from string S would be a breeze. Have you
explored this option?
Hope this helps in some way.
Barry Evans
Canberra, Australia
----------------------------
I would like to save a HTML page currently displayed in the WebBrowser
control into a file. Can anybody give me a hint?
Thanks
Jiri