你如何获得主题和主题? Word 文档中的标题(无需打开它)?
我想从 Word 文档中读取标题和主题字段,但不想花费启动 Word 来执行此操作的开销。
如果在 Windows 资源管理器中显示标题和主题列,然后导航到其中包含 Word 文档的文件夹,则会显示此信息。使用什么机制来执行此操作(除了 Shell 扩展),因为它速度很快(但我不知道您是否真的需要安装 Word 才能工作),所以我猜它不会启动Word并打开每个文档。
我找到了 Dsofile.dll 的链接,我想我可以使用它,但这适用于 .doc 和 .docx 文件吗?这是唯一的方法吗?
I would like to read the title and subject fields from a Word document, but would rather not have the overhead of firing up Word to do it.
If, in Windows Explorer, I display the title and subject columns, and then navigate to a folder that has Word documents in it, then this information is displayed. What mechanism is being used to do this (aside from Shell extensions) because its fast (but I don't know if you actually need Word installed for this to work), so I'm guessing its not firing up Word and opening each document.
I've found a link to Dsofile.dll, which I presume I could use, but does this work for .doc and .docx files and is it the only way ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧...正如人们可能假设“.doc”文件的时间正在流逝一样,这里是一种从“.docx”文件(或“.xlsx”文件)获取主题和标题的方法事)。
我希望这对某人有用。
Well... as one might assume that the time of the ".doc" file is passing, here is one way to get the subject and title from a ".docx" file (or ".xlsx" file for that matter).
I hope this is useful to someone.
您也可以通过 XML 读取它:如何使用 Office 文件格式和架构从 Office 文件中提取信息
这是关于如何以编程方式读取 Word 文档的另一个示例。
不管怎样,你必须在某个时刻查看文件内部!
You can read it via XML, too: How to extract information from Office files by using Office file formats and schemas
Here is another example on how to read a Word doc programmatically.
One way or the other you'll have to look inside the file at some point!