使用OpenXML打开受保护的Word文档

问题描述:

我搜索了所有地方,但是找不到任何答案. 所有的帖子和讨论都是关于创建受保护的内容,但没有任何内容可以打开它.

I have searched every where but, I can't found any answer. All posts and discussions are about creating protected one but nothing for open it.

我在c#程序中已保护DOCX和DOC文档,并希望使用OpenXML 2.5以编程方式打开它们.

I have protected DOCX and DOC documents in my c# program and want to open them programmatically using OpenXML 2.5.

我已经使用Office interlope打开了它们,因为它具有密码参数. 但是使用大量文档时,速度非常慢.

I have opened them using Office interlope as it has password parameter. But it's very slow with large documents number.

我可以使用OpenXml打开受密码保护的Word文档吗?怎么样?

Can i open password protected word documents using OpenXml ? How ?

谢谢.

受密码保护的文档(使用密码保存的文档)不是Zip软件包,而是二进制文件.如果考虑一下,原因很明显:XML文件的Zip包是人类可读的-不安全.因此,您无法通过Open XML文件格式来操作受密码保护的Word文档-根本就没有.

Password protected documents (documents saved with a password) are not Zip packages, they're binary files. If you think about it, the reason is obvious: a Zip package of XML files is human-readable - not secure. So you can't manipulate password protected Word documents via the Open XML file format - it's simply not there.