首先添加com引用CDO for windows 2000 library,然后下面的函数就可以完成下载的功能:
代码
static void downloadMht(string url, string path)
{
CDO.Message msg = new CDO.Message();
CDO.Configuration cfg = new CDO.Configuration();
msg.Configuration = cfg;
msg.CreateMHTMLBody(url, CDO.CdoMHTMLFlags.cdoSuppressAll, "", "");
msg.GetStream().SaveToFile(path, ADODB.SaveOptionsEnum.adSaveCreateOverWrite);
}