Using CDO and CreateMHTMLBody

O

Olivier

Hi,
I use CDO and CreateMHTMLBody to retrieve source of my page. It work
great but...
on some site the result file is different from the SaveAS of Internet
Explorer: all .js code is not present with CreateMHTMLBody (whereas
img are correct).
I don't know how to force the same behaviour. The problem can be
reproduced on http://www.ratp.fr
Here is my code:
public static string WBSaveAsMHT(string url)
{
CDO.Message msg = null;
ADODB.Stream stream = null;
string source = string.Empty;

try
{
msg = new CDO.MessageClass();
msg.CreateMHTMLBody(url,
CDO.CdoMHTMLFlags.cdoSuppressNone, null, null);
stream = msg.GetStream();
source = stream.ReadText(stream.Size);
return source;
}
catch (Exception ex)
{
}

return source;
}
Thanks !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top