如何在C#中使用Open XML SDK将DOC转换为DOCX

问题描述:

请帮助我使用open xml sdk或除单词自动操作以外的任何其他方法将.doc文件转换为.docx。

Please help me to convert .doc file to .docx using open xml sdk or any other method except word automation.

请先谢谢您。

OpenXML SDK仅允许您操作 .docx 文件,而不能操作 .doc 。这是博客文章说明如何使用批量转换实用程序将.doc批量转换为.docx文件。恐怕如果您不想使用Word Automation,就必须编写自己的 .doc 解析器,这可能是一个好工作。

The OpenXML SDK allows you to manipulate only .docx files, not .doc. Here's a blog post illustrating how to perform bulk conversions of .doc to .docx files using a bulk conversion utility. I am afraid that if you don't want to use Word Automation, you will have to write your own .doc parser which might be quite a work.