以编程方式锁定、验证和签署使用 VSTO 创建的 Word 文档?
我想使用 VSTO 生成某种法律文件(账单、估算)。 我想知道是否有任何方法可以使这些 Word 文档完全只读(您无法从 OpenOffice 进行修改)。 否则,有没有办法以编程方式生成“密钥”来签署文档内容?
总而言之,我只是想证明内容是正确的,并且我是原创者......
谢谢
I'd like to produce some kind of legal documents (bills, estimates) using VSTO.
I was wandering if there's any way to make these word documents completely read-only (by that you cannot modify from OpenOffice).
Otherwise, is there a way to programmatically generate a "key" to sign the content of the document ?
In a word, I just want to certify that the content is the correct one and that I'm the originator...
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您可以完全按照您的要求签署办公室文件。 请参见此处。一旦文档超出您的控制范围,您就无法阻止文档被更改,但是如果文档被更改,签名将变得无效,并且恶意编辑者在没有您的私钥的情况下将无法生成有效的签名。
我不确定你到底是如何在编程上做到这一点的,但如果 .NET BCL 或 VSTO 没有提供这样做的 API,我会感到非常惊讶。
Yes, you can sign an office document exactly as you require. See here. You can't prevent the document from being altered once it is out of your control, but the signature would be rendered invalid if it were altered and the nefarious editor would be unable to generate a valid signature without your private key.
Exactly how you do that pro-grammatically I am unsure, but I would be very surprised if the .NET BCL or VSTO did not provide an API for doing so.