日期:2014-05-19  浏览次数:20745 次

如何提取word文档的内容
C#如何提取word文档的内容,就是知道一个word文档的路径,如何把里面的内容通过程序给读出来?这个如何实现,谢谢!

------解决方案--------------------
================接上
调用方法:
CCWordApp test;
test = new CCWordApp();
test.Open(fi.FullName);
//这里为什么是2不是1呢?没整明白
if (test.Count < 2)
{
test.GoToTheEnd();
test.InsertText( "略 ");
test.Save();
Content.Text += "处理了下面的文件: " + fi.Name + "\r\n ";
}
else
{
Content.Text += "略过了下面的文件: " + fi.Name + "\r\n ";
}

test.Quit();