在不打开Word的情况下读取* .doc文件 [英] Reading *.doc files without Word opening

查看:131
本文介绍了在不打开Word的情况下读取* .doc文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道任何无需使用(打开)Word即可读取* .doc(1997年至2003年)文件的算法吗?

Does anybody know any algorithm for reading *.doc (1997 - 2003) files without using (opening) of Word ?

推荐答案

您需要使用 Microsoft Word Interop程序集 [

我给你一个主意:
如果您真的只想阅读 *.doc文件,那么我的想法就不好了.
但是,如果您不确定,但想阅读以doc格式格式化的内容,则可以将doc文件重新保存为* .docx,基本上可以将其解压缩为存档,然后在其中搜索包含格式化文本的文件解压缩的文件夹.如果我还记得的话,它叫做[document.xml].您可以从该xml中提取未格式化的文本或任何您喜欢的文本.
祝你好运.
I will give you an idea:
If you really want to read only*.doc files, then my idea is of no good.
But if you are undecided and want to read something formatted in a doc style, you can re-save the doc file in a *.docx which is basically an archive that you can unzip it, then search the file containing the formatted text in that unzipped folder. If I remember well, is called [document.xml]. From that xml you can extract the text unformatted or whatever you like.
Good luck.


oWord.visible = false;//should be sufficient.


这篇关于在不打开Word的情况下读取* .doc文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆