我的html文件中有图片
程序如下:public void ConvertToHtml(string SrcFilePath,string TargetFilePath)
{
Word.Application app=new Word.Application();
app.Visible=false;
Object o=System.Reflection.Missing.Value;
object docFile=SrcFilePath;
object formatx=Word.WdOpenFormat.wdOpenFormatWebPages; //word format
Word.Document doc=app.Documents.Open(ref docFile,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref formatx ,ref o,ref o,ref o ,ref o,ref o,ref o); object fileName=TargetFilePath;
object format=Word.WdSaveFormat.wdFormatDocument; //word format
doc.SaveAs(ref fileName,ref format,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o,ref o);
object t=true;
app.Quit(ref t,ref o,ref o);
}