如何以编程方式检查MS Word 2007文档的任何文档属性是否已更改? [英] How do I check programmatically if any document properties of a MS Word 2007 document has changed?

查看:81
本文介绍了如何以编程方式检查MS Word 2007文档的任何文档属性是否已更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我希望只要更改文档属性面板中的"标题"字段,就会自动更新正文中的"标题"字段和文档的页眉。我知道如何更新字段,但我想知道事件的名称,它将告诉我文档属性何时发生变化。

For example, I want the Title fields in the body and the page headers of the document to be updated automatically whenever the Title field in the document properties panel is changed. I know how to update the fields, but I want to know the name of the event that will tell me when the document properties have changed.

我们将非常感谢您的帮助。谢谢。

Your help will be appreciated. Thanks.

推荐答案

检查的最佳位置是在Document_Close()期间事件。此时,您可以使用文档属性中的标题字段更新字段。
The best place for the check would be during the Document_Close() event. At this time you can update the fields with the Title field in the document properties.


这篇关于如何以编程方式检查MS Word 2007文档的任何文档属性是否已更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆