将DOTX转换为DOCX [英] Convert DOTX to DOCX
本文介绍了将DOTX转换为DOCX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有人使用Open XML SDK 1.0将DOTX文件转换为DOCX文件?
非常感谢,
Charles
解决方案
嗨Charles,
我没有示例代码,但是你必须在文档中更改(除了文件扩展名,当然)是文件[Content_Types]中的主要文档部分的内容类型.xml
Word文档有内容类型
< 覆盖 PartName = " /word/document.xml" ContentType = " application / vnd.openxmlformats-officedocument.wordprocessingml。 document 。 main + xml" />
Hi,
Does anyone have sample code to convert a DOTX file to a DOCX file using Open XML SDK 1.0?
Thanks a lot,
Charles
解决方案Hi Charles,
I do not have sample code, but the only thing that you have to change in the document (besides the file extension, of course) is the content type of the main document part in the file [Content_Types].xml
Word document have content type
<Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" />
这篇关于将DOTX转换为DOCX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文