Introduction
Customization of Office 2007 applications like Word or Excel is very easy with Visual Studio 2008. Nowadays a day lot of real-time business requirement is accomplished by Office customization. Office ribbon provides rich UI and you can add your own custom tab on it very quickly.
This article describes a step-by-step method for creating a Custom Tab in Excel/Word 2007 at UI Ribbon. The user doesn't need to write a single line of code to achieve 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 a new Excel 2007 Add-in project.
In the solution explorer, you can see the following image.
This AddIn.cs contains the required method for designer Support.
Step 2. In this step, you can add a 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).
In the solution explorer, you can see the RibbonCustom.cs file and also its designer view.
Step 3. In the designer view of RibbonCustom.cs, from the box, add a new Tab into the bottom panel of the Ribbon.
Step 4. Now, you can see the new tab. From the Properties of the new Tab, you can set your own name and label.
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 buttons, labels, Gallery, etc) are the child of Group control.
Step 6. Easy Press the F5 button it will build and run one Excel with your custom tab on the ribbon.
Cool Right? Please Try it.
How do I publish the setup of this project?
From the Visual Studio toolbar, Click on the Build item, select the Publish ExcelAddinCustom Tab, and follow the wizard. It will create the setup.exe in the selected folder.
Create Custom Tab for Word 2007
Create New Project Select the Word 2007 Add-in template from the office category and follow the same steps as described for the Excel Add-in.
How to disable the Add-in?
- Open Excel file
- Click on the Top Left Round Button (Microsoft Office Button)
- Click on the Excel Option Button available at the bottom.
- From Excel Options Dialog, Select Add-In Tab
- Select COM Add-ins From the Manage Combo box, and Click the Go Button.
- Uncheck unwanted Add-ins From the COM Add-Ins list
You also get a piece of good information for enabling/disabling office add-in from Here
http://office.microsoft.com/en-us/help/HA100341271033.aspx
How do you permanently remove the Add-in?
Go to Control Panel -> Programs and Features -> Uninstall the setup.