字VSTO覆盖CTRL + Z/CTRL + Y [英] Word VSTO override CTRL+Z / CTRL+Y

查看:142
本文介绍了字VSTO覆盖CTRL + Z/CTRL + Y的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法来覆盖撤消( Ctrl Z )/重做( Ctrl Z )命令(Word 2010(C#+ VSTO)). 有可能吗?

I'm looking for a way to override Undo (CtrlZ) / Redo (CtrlZ) commands in Word 2010 (C# + VSTO). Is it possible ?

我设法捕获了复制/粘贴命令,但似乎撤消/重做不是RibbonUI中像复制/粘贴这样的命令.

I managed to catch Copy / Paste commands, but it seems that Undo / Redo are not commands in RibbonUI like Copy / Paste.

推荐答案

如果您想对撤消/重做"进行一些控制,请查看Microsoft.Office.Interop.Word.UndoRecord.这是线程学会了正确使用它!

If you want some control over what happens with Undo/Redo, check out Microsoft.Office.Interop.Word.UndoRecord. Here's the thread where I learnt to use it properly!

如果您想捕捉实际的击键,那么您就在Windows API领域.因此,一般而言,Google术语与此相关.但是 message-hooks-插件可能对您有用.

If you want to catch the actual keystrokes, then you're in Windows API land. So generally, Google terms related to that. But message-hooks-in-add-ins may be useful to you.

这篇关于字VSTO覆盖CTRL + Z/CTRL + Y的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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