从客户端上载的 Word文件,
如何由asp.net的后台代码在服务器端转为html文件.
问了N次的问题,没人回答清楚。
有哪位老大给个完整步棸和C#的源码,我给他一百分
不够再加
---------------------------------------------------------------
// Create a new instance of Word
Word.ApplicationClass word = new Word.ApplicationClass();
Type wordType = word.GetType();
Word.Documents docs = word.Documents;
// Open a file
Type docsType = docs.GetType();
object fileName = "c:\\test2\\XP Embedded vs. Win CE.NET.doc";
Word.Document doc = (Word.Document)docsType.InvokeMember("Open", System.Reflection.BindingFlags.InvokeMethod, null, docs, new Object[] {fileName, true, true});
// Save a file
Type docType = doc.GetType();
object saveFileName = "c:\\test2\\XP Embedded vs. Win CE.NET";
docType.InvokeMember("SaveAs", System.Reflection.BindingFlags.InvokeMethod, null, doc, new object[]{saveFileName, Word.WdSaveFormat.wdFormatFilteredHTML});
// Quit Word
wordType.InvokeMember("Quit", System.Reflection.BindingFlags.InvokeMethod, null, word, null);