object fileName = ""+WebHelp.GetMapPath("20130806-0809.doc");
object saveFileName = "e:\\路径\\sss.swf";
Word.ApplicationClass word = new Word.ApplicationClass();
Word.Documents docs = word.Documents;// 打开文件
Type wordType = word.GetType();
Type docsType = docs.GetType();
Word.Document doc = (Word.Document)docsType.InvokeMember("Open", System.Reflection.BindingFlags.InvokeMethod, null, docs, new Object[] { fileName, true, true });
Type docType = doc.GetType();// 转换格式,另存为
docType.InvokeMember("SaveAs", System.Reflection.BindingFlags.InvokeMethod, null, doc, new object[] { saveFileName, Word.WdSaveFormat.wdFormatWebArchive });//wdFormatHTML(网页);wdFormatWebArchive(mht网页)
wordType.InvokeMember("Quit", System.Reflection.BindingFlags.InvokeMethod, null, word, null);//退出 Word
求大神解答,这样能出来,但是给我的感觉就是强制的修改了后缀名导致文件无法打开
哪位大神做过类似的功能
哦 我好想自己搞出来了 但不完美