Create Custom MS Word Ribbon Tab Using Ribbon XML In C#

In this article I’m going to explain how to add a custom ribbon tab using the Ribbon (XML) item.

In order to complete this walkthrough you need following components :

Step 1 : Create a Project

Then click next and add any name you want in project name. Select .Net Framework version and click create.

Step 2 : Create a VSTO Add-Ins Tab

Open ThisAddin.cs in solution explorer and add following code to it. This code overrides the CreateRibbonExtensibilityObject method and returns the Ribbon XML class to the Office application.

Step 3 : Customize your Ribbon

Add following function to the Ribbon1.cs and you can add any c# code to your function body. Make sure to add method name same in the onAction name in the Ribbon1.xml.

Step 4 : Build And Run

I hope to continue writing regarding Office and SharePoint development in Visual Studio in my next articles.

Thank You for reading !