Word转换成Html
protected void ConvertToHtml(string docPath,string htmlPath){&n
protected void ConvertToHtml(string docPath,string htmlPath)
{
Word.Application app=new Word.Application();
app.Visible=false;
Object o=Missing.Value;
object docFile=docPath;
_Document doc=app.Documents.Open(ref docFile,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 fileName=htmlPath;
object format=8;//Html
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);
}
本文作者:Nina-piaoye 来源:http://www.cnblogs.com/Nina-piaoye/
CIO之家 www.ciozj.com 微信公众号:imciow
版权声明:CIO之家尊重行业规范,每篇文章都注明有明确的作者和来源;CIO之家的原创文章,请转载时务必注明文章作者和来源;
延伸阅读