关于Word中文档比较的C#事件 [英] C# event on comparing documents in Word
问题描述
您好,
用户比较2份文件时是否可以捕获事件?
我需要在新文件(比较结果)创建时做点什么。
问候
Krzysztof Czuchra
Hello Krzysztof Czuchra,
至于我知道,MS Word没有提供比较的事件 文件。
在我的测试中,即使我们在新文档中显示更改,新文档的事件也不会触发。
作为此解决方法,你可以选择
DocumentChange 事件,可在比较文档后触发。但是在许多情况下也可以调用它,你可能需要一些条件来触发你需要的代码。
最好的问候,
Terry
Hello,
Is it possible to catch event when user comparing 2 documents?
I need to do something when new document (comparing result) creates.
Greetings
Krzysztof Czuchra
Hello Krzysztof Czuchra,
As far as I know, MS Word does not provide an event for comparing documents.
And in my test, the event for New Document does not trigger even we show changes in new document.
As a workaround for this, you could choose DocumentChange event which could be triggered after comparing document. However it could also be called in many situations, you may need some condition to trigger code in your need.
Best Regards,
Terry
这篇关于关于Word中文档比较的C#事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!