只读自定义属性
我设法从 VBA 为 MS Word 添加自定义属性(元数据),但如何使其只读以便无法轻松更改?
I managed to add custom properties (metadata) for MS Word from VBA, but how do I make it read only so that it cannot be changed easily?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用文档变量(http: //msdn.microsoft.com/en-us/library/bb212231.aspx)。 您只能通过代码访问它们。 他们没有用户界面。
以下是我使用的一些旧 VB6/VBA 函数:
Instead of using document properties use document variables (http://msdn.microsoft.com/en-us/library/bb212231.aspx). You can only access them through code. There's no UI for them.
Here's some old VB6/VBA functions I used for them:
你不能。
根据您想要避免的情况,您也许可以“混淆” 通过以某种方式加密内容来获取属性。 这将使用户更难弄清楚如何将它们更改为有用的东西 - 但不会阻止用户“破坏”它。
You can't.
Depending on what sort of scenario you're trying to avoid, you might be able to "obfuscate" the properties by encrypting the contents somehow. That would make it harder for a user to figure out how to change them to something useful - but wouldn't stop the user from "breaking" it.