RatneshK

hi,

I have written a c# BHO. Can i generate a MHTML file from the currently navigated document. I have access to this document from IWebBrowser interface. So when

protected void DocumentComplete(object pDisp, ref object URL)
{
try
{
if (Marshal.Equals(m_pIWebBrowser2, pDisp))
{
//Here i can use "m_pIWebBrowser2.Document" to get access to that document
}
}
}

But can i use this Document reference to generate a MHTML file, so that i can see the complete page without missing holes in offline mode.

thanks
Ratnesh


Re: Internet Explorer Extension Development MHTML file generation from WebBrowser's Document

MikeB01

This will save the document. However there may still be some images and such missing.

UCOMIPersistFile pf = (UCOMIPersistFile) doc;
pf.Save( path,
true);

- Mike