How to Trap Shortcut Keystrokes

T

Tim Pulley

I've written an Add-In (C++ and ATL) that hooks some Outlook command bar
buttons. Outlook calls my Add-In when the hooked menu items are selected or
when the command bar buttons are pressed but not when the associated
shortcut is used.

As an example, If the "Reply" command bar button is pressed my Add-In is
called. However my Add-In is not called when the shortcut, Ctrl+R, is used.

Is this a known problem? Is there away to work around this?

Thanks, TC
 
K

Ken Slovak - [MVP - Outlook]

You would either have to hook the actual event to handle it or use a Windows
message hook to capture key strokes. For the event handler you would need to
instantiate an Outlook mail item for each selected item in the Explorer and
handle each mail item's Reply event (and Reply to All and Forward). If the
items are open you would need to trap those events in the CurrentItem in the
ActiveInspector.
 

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