VSTO Plugin and Shortcut Keys

S

Sanjay

Hello,
I am trying to assign a shortcut key to a command button created in
a VSTO outlook plugin. I must be missing something but nothing seems to
work. Here is my code:

MSO.CommandBarButton cmdButton;
cmdButton=
(MSO.CommandBarButton)oCommandBar.Controls.Add(MSO.MsoControlType.msoControlButton,
_missing, _missing, _missing, true);
cmdButton.Caption = "Banking";
cmdButton.ShortcutText = "Z";
cmdButton.OnAction = "!<MyVSTOPlugin>";
cmdButton.Click += new
_CommandBarButtonEvents_ClickEventHandler(cmdButton_Click);


What am I missing? My understanding is that "Alt+Z" should fire the
cmdButton.Click event.

Sanjay
 
K

Ken Slovak - [MVP - Outlook]

Does "Alt+Z" work? That's what would be used for the key combination that
you want.
 
S

Sanjay

Alt+Z does not work. Am looking into writing windows hook. Any
suggestions?

Sanjay
 
K

Ken Slovak - [MVP - Outlook]

Suggestions for writing a Window message hook? Not really, there are lots of
examples out there that are language specific, just google for them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top