Adding a button to Outlook’s context menu.

Took me a while to figure this one out…

To add a button to the Outlook explorer context menu you need to get the “Context Menu” CommandBar.
This command bar instance is only created when the user right clicks in the explorer so in order to know when such a bar is
created you have to listen to the OnUpdate event of the Explorer’s CommandBars collection.
Inside the OnUpdate event handler you can check if the context menu CommandBar exist :

CommandBar bar = ActiveExplorer.CommandBars[“Context Menu”];

After getting the conext menu CommandBar you need to change it’s Protection property to allow customization, add your button, and change the Protection back.

That’s it…  enjoy 🙂

You may also like...

1 Response

  1. Jayashree Sekar says:


    In Outlook 2003 Addin’s OnClick handler of a context menu button ( in Outlook mail message window),
    I need to insert a text (example “” ) in the cursor position checking whether the focus is in the
    “Subject” (or) in the “body” of the email.

    Can you please tell me how to find the current cursor position (or) the control focus to implement my

    Need you help. Please guide me.

    Thanks in advance,