Creating a custom Tab in VSTO

If you haven’t used VSTO, it’s the framework for developing Office Integrations.  Yes, people are still developing Office plugins, although Flow is coming on strong, there is still a need for organizations to have components directly embedded in their primary applications of choice.

If you’re looking to get started on building your own Tab in Office you can do this very easily by adding a Ribbon.xml file to your VSTO project with the following syntax.

<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="" onLoad="Ribbon_Load">
 <!--<tab idMso="TabMail">-->
 <tab id="tabForgotten" label="Coder">
 <group id="MyGroup" label="Content">
 <button id="btnGo" label="Connect" 
 screentip="Go" onAction="OnConnectClicked"
 supertip="Go to start."/>

Once you’ve added that snippet, simply navigate back to your main AddIn.cs file and instantiate your ribbon.

protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
return new SuperRibbon();

Compile and run (in this example, I created an Outlook VSTO plugin) and you can now see your new menu item.


Connecting the events are even easier as a complimentary .cs file is created where you can easily wire up this event.

public void OnConnectClicked(Office.IRibbonControl control)


Lastly, you’ll notice that in my XML tab declaration there is a value that is commented out called TabMail.  All built-in Tabs have their own tabs that you can piggy back off to include your controls therein instead of creating your own tab as was done previously.  All that needs to change is that value.

Post A Reply

%d bloggers like this: