//导入CDO组件
//导入ADODB组件

[STAThread]
static   void   Main(string[]   args)
{
HtmlToMht( "http://www.csdn.net/ ",   "k:\\csdn.mht ");
}

public   static   void   HtmlToMht(string   src,   string   dst)
{
CDO.Message   msg   =   new   CDO.MessageClass();
CDO.Configuration   c   =   new   CDO.ConfigurationClass();
msg.Configuration   =   c;
msg.CreateMHTMLBody(src,   CDO.CdoMHTMLFlags.cdoSuppressNone,   " ",   " ");
ADODB.Stream   stream   =   msg.GetStream();
stream.SaveToFile(dst,   ADODB.SaveOptionsEnum.adSaveCreateOverWrite);
}

相关文章:

  • 2021-12-05
  • 2021-12-18
  • 2021-12-28
  • 2021-05-01
  • 2021-06-21
  • 2021-12-05
  • 2021-05-09
猜你喜欢
  • 2022-01-17
  • 2021-12-05
  • 2022-02-27
  • 2021-09-26
  • 2021-07-20
相关资源
相似解决方案