有没有办法捕获Excel VSTO中的HotKeys /快捷方式只使用C#而没有VBA? [英] Is there a way to capture HotKeys/Shortcuts in Excel VSTO using only C# and no VBA?

查看:242
本文介绍了有没有办法捕获Excel VSTO中的HotKeys /快捷方式只使用C#而没有VBA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我想在我们的Docuement级Excel VSTO插件中捕获一些关键命令。我似乎找不到办法,除了使用VBA和我们的加入谈话VBA。任何帮助/例子将不胜感激。

So I want to capture some key-commands in our Docuement-level Excel VSTO addin. I can't seem to find a way to do it, other than to use VBA and have our addin talk to the VBA. Any help/examples would be greatly appreciated.

我正在使用Excel 2007。

I am using Excel 2007.

推荐答案

您只能通过API调用来对Excel进行子类化,并观察键命令。 这是较老,但仍然适用。

You can only do this through API calls to subclass Excel and watch for key commands. This is older, but it still applies.

这篇关于有没有办法捕获Excel VSTO中的HotKeys /快捷方式只使用C#而没有VBA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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