c# - Microsoft.Office.Interop.Word 中的更改事件

标签 c# ms-word office-interop

上面提到的命名空间中是否有任何事件在发生任何更改或编辑文档时触发,例如,发生文本输入

我试过了

Microsoft.Office.Interop.Word.ApplicationEvents4_WindowSelectionChangeEventHandler
&
Microsoft.Office.Interop.Word.ApplicationEvents4_EPostageInsertEventHandler

但是每当我在事件的 word 文档中插入文本时,我都无法触发事件。

最佳答案

不幸的是,Word 对象模型没有公开任何按键事件,

Word 事件列表 - Document Events

您可以尝试实现 global keyboard hook通过 Win32 API 实现您想要的。

关于c# - Microsoft.Office.Interop.Word 中的更改事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9844676/

相关文章:

C# 入口点类修饰符

c# - Xamarin Android C# 计时器错误

c# - 使用 WordProcessingDocument 时如何删除 XMLSchemaReference?

ms-word - Word VSTO 加载项 : Get Working Area Coordinates/Rectangle on Screen

ms-office - Windows Server 2012 上的办公自动化 (Interop)

c# - 响应.Transmitfile();可以保存但打不开

c# - varchar(max) + linq to sql

javascript - 如何使用html代码将html页面转换为excel

c# - 如何从富文本框向word文档中插入文本

c# - 有什么方法可以将 Microsoft word 文档转换为记事本文件 .txt 格式吗?