Create Custom Tab in Office Ribbon at Excel/ Word 2007



Introduction

Customization of office 2007 application like word or excel is very easy  with Visual studio 2008. Now a day lot of real time business requirement is accomplished by the  Office customization. Office ribbon is providing rich UI and you can add your own custom tab on it very quickly.

This article describes step-by-step method for creating Custom Tab in Excel/Word 2007 at UI Ribbon.  User doesn't need to write a single line of code for achieving the functionality described in this article. All code is automatically generated by Visual Studio 2008 Project Template.

Step-by-step description starting from here.

Step 1: Create new Excel 2007 Add-in project

1.gif

In the solution explorer you can see as following image.

ThisAddIn.cs contain required method for designer Support

2.gif

Step 2 

In this step you can add new ribbon visual Designer to the project.

Right Click on the Project file->Add -> Select New Item in the Office category -> select Ribbon (Visual designer)

3.gif

In the solution explorer you can see RibbonCustom.cs file and also its designer view

4.gif

Step 3

In the designer view of RibbonCustom.cs, from tool box add new Tab in to bottom panel of the Ribbon

5.gif

Step 4 

Now ... You can see the new tab. From Properties of new Tab, you can set your own name and label

6.gif

Step 5

Add your own control to the tab from Tools. Remember that for adding any control first need to add "Group". All controls (like Button, Label, Gallery etc) is the child of Group control 

7.gif

Step 6

Easy ... Press F5 button it will build and run one excel with your custom tab on the ribbon

8.gif

Cool...  Right?  Please Try it.

How to publish the setup of this project?

From Visual studio tool bar Click on Build item and select Publish ExcelAddinCustom Tab and follow the wizard it will create the setup.exe at selected folder

Create Custom Tab for Word 2007

Create New Project and select Word 2007 Add-in template from office category and follow the same step as described for Excel Add-in

9.gif

How to disable the Add-in?

  1. Open Excel file
  2. Click on Top Left Round Button (Microsoft Office Button)
  3. Click on Excel Option Button available at bottom
  4. From Excel Options Dialog Select Add-In Tab
  5. Select COM Add-ins From Manage Combo box , Click Go Button
  6. Uncheck  unwanted Add-ins From COM Add-Ins list

You also get a good information for enable/disable office add-in from Here

http://office.microsoft.com/en-us/help/HA100341271033.aspx

How to permanently remove the Add-in?

Go to Control Panel -> Programs and Features -> Uninstall the setup


Similar Articles