怎么用代码把mht文件转换成html文件
发布网友
发布时间:2022-04-23 06:17
我来回答
共1个回答
热心网友
时间:2023-10-03 05:58
我只知道怎么将htm文件转换成mht格式文件,呵呵
public void SaveMht(string url,string path)
{
CDO.Message msg = new CDO.MessageClass();
CDO.Configuration c = new CDO.ConfigurationClass();
msg.Configuration = c;
msg.CreateMHTMLBody(url, CDO.CdoMHTMLFlags.cdoSuppressObjects, "", "");
ADODB.Stream stream = msg.GetStream();
stream.SaveToFile(path,ADODB.SaveOptionsEnum.adSaveCreateOverWrite);
}
热心网友
时间:2023-10-03 05:58
我只知道怎么将htm文件转换成mht格式文件,呵呵
public void SaveMht(string url,string path)
{
CDO.Message msg = new CDO.MessageClass();
CDO.Configuration c = new CDO.ConfigurationClass();
msg.Configuration = c;
msg.CreateMHTMLBody(url, CDO.CdoMHTMLFlags.cdoSuppressObjects, "", "");
ADODB.Stream stream = msg.GetStream();
stream.SaveToFile(path,ADODB.SaveOptionsEnum.adSaveCreateOverWrite);
}