当 Word 文档中的 CustomDocumentProperties 更改时捕获事件

Capture event when CustomDocumentProperties change in a Word document

我正在为 Microsoft Word 和 Azure 信息保护开发一个插件。当用户更改文档的分类时,Azure 信息保护加载项正在更新我的 Word 文档中的 CustomDocumentProperties。我需要捕获更改自定义属性的事件以对其进行操作并在文档中插入一些文本。 有什么方法可以在属性更改时捕获事件?

不,没有在 Word 中触发的事件。

如果提到的加载项没有提供让您选择它的界面,唯一的方法是保存涉及的自定义文档属性的值并定期将它们与当前值进行比较。

您可以考虑使用嵌套在 {IF} 字段中的 {DocProperty} 字段来动态生成内容,而不是手动将文本写入文档。然后简单地更新字段将显示正确的信息。

你上面写的"Rather than manually writing text to the document you might consider using {DocProperty} fields nested in {IF} fields to dynamically generate the content. Then simply updating fields will show the correct information."很难看懂。 你能更简单地解释一下吗?