• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1093
  • Last Modified:

Bind shortcut key to a function in VSTO

I currently doing a word VSTO, I need to bind my shortcut key to a function. Example binding a shortcut key "ctrl + D" to display a message box. How do I do it using VB.net?
1
KenTan85
Asked:
KenTan85
  • 3
  • 2
1 Solution
 
xenacodeCommented:
Unfortunately VSTO doesn't support shortcut keys. You can however add key tips to controls on the ribbon (if this is Office 2007) e.g. by setting the KeyTip property to "D". This requires the user to press Alt + D instead of Ctrl + D and of course you need a ribbon control.

Pete
0
 
KenTan85Author Commented:
But the keytip need to hold on the alt to go to the right ribbon before I can do a alt + D. Is there way to skip the 1st alt?
0
 
xenacodeCommented:
No
0
 
KenTan85Author Commented:
Then I understand that vba can assign shortcut key. Is it possible to make VSTO call a VBA marcos to assign a shortcut key then?
1
 
xenacodeCommented:
VSTO solutions and macros are really two completely separate things. It may be that a macro is actually the best solution for you here. (I very rarely say those words!)

Pete
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now