Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Bind shortcut key to a function in VSTO

Posted on 2009-07-02
5
Medium Priority
?
1,051 Views
1 Endorsement
Last Modified: 2013-11-10
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
Comment
Question by:KenTan85
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:xenacode
ID: 24770698
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
 

Author Comment

by:KenTan85
ID: 24771048
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
 
LVL 6

Expert Comment

by:xenacode
ID: 24771080
No
0
 

Author Comment

by:KenTan85
ID: 24771096
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
 
LVL 6

Accepted Solution

by:
xenacode earned 2000 total points
ID: 24771141
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question