Create Add-In for Outlook 2013 for add a Button

Simone picture Simone · Aug 6, 2015 · Viewed 9k times · Source

Good morning, my company is looking for a solution in order to distribute an add-in for Outlook 2013 that add a button in the ribbon. I want to create an add-in for Outlook 2013 and I saw that is possible using Visual Studio (I use VS 2013 or 2010) but I don't understand how to add a button in the ribbon (in particular in Home section) and execute a macro when I click on the button (the macro is already created). I read this tutorial https://msdn.microsoft.com/en-us/library/cc668191.aspx and this worked. Someone can help me with some piece of code(c#)? Thanks for your help

Answer

Eugene Astafiev picture Eugene Astafiev · Aug 6, 2015

VSTO provides two main ways for customizing the Ribbon UI:

  1. Using the Ribbon designer. See Walkthrough: Creating a Custom Tab by Using the Ribbon Designer for more information.

  2. Using the Ribbon XML markup. See Walkthrough: Creating a Custom Tab by Using Ribbon XML for more information.

You need to specify the idMso attribute of the built-in tab if you need to add your custom controls there. See Office 2013 Help Files: Office Fluent User Interface Control Identifiers for control IDs.

Finally, I'd suggest moving your VBA macro to the add-in. It will improve the overall performance and allows to use the BCL classes (a wide varioety of controls and components) for getting the job done. Moveover, you will be able to deplay the add-in easily. VBA macros are not designed for deployiong on multiple PCs.