vbaoutlookoutlook-2013

How to add to Outook 2013's ribbon and/or get a ribbon button's name using VBA?


I need to do two things:

  1. Add buttons to a custom group on the "Home" tab of the Outlook 2013 ribbon using Outlook 2013 VBA.

    • Everything I found online refers to Excel or Word.
  2. Within the macro that runs when each button is clicked I want to be able to tell the name of the button that was clicked.

    • I want to have a variable number of buttons like "Do 1", "Do 2", "Do 3", ..., "Do X" and each of them would run the same macro/sub and within the macro/sub I can see the name of the button so I know what to do. Otherwise I'd have to create a sub/macro for each button and I'm trying to avoid that.

Solution

  • The only possible way is to develop an add-in. Outlook doesn't allow to customize the UI using VBA.

    You may find the Walkthrough: Creating a Custom Tab by Using the Ribbon Designer page helpful.