百度空间 | 百度首页 
 
查看文章
 
使用C#实现将html转换成mht
2009-02-26 11:38

CDO.Message msg = new CDO.MessageClass(); CDO.Configuration c = new CDO.ConfigurationClass(); msg.Configuration = c; msg.CreateMHTMLBody( "http://www.yesky.com", CdoMHTMLFlags.cdoSuppressAll, "", ""); msg.GetStream().SaveToFile(@"d:\1.mht", ADODB.SaveOptionsEnum.adSaveCreateOverWrite);

CdoMHTMLFlags Enum 申明
Name Value Description
CdoSuppressNone 0 Download all resources referred to in elements within the resource at the specified Uniform Resource Identifier (URI) (not recursive).

CdoSuppressImages 1 Do not download resources referred to in IMG elements.
CdoSuppressBGSounds 2 Do not download resources referred to in BGSOUND elements.
CdoSuppressFrames 4 Do not download resources referred to in FRAME elements.
CdoSuppressObjects 8 Do not download resources referred to in OBJECT elements.
CdoSuppressStyleSheets 16 Do not download resources referred to in LINK elements.
CdoSuppressAll 31 Do not download any resources referred to from within the page.


类别:.net开发 | 添加到搜藏 | 浏览() | 评论 (1)
 
最近读者:
 
网友评论:
1
2009-02-28 19:49 | 回复
看不懂
 
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu