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?
KenTan85Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.