
Adding Buttons to the Add-Ins Tab
The goal for this add-in is to give users a way to add boilerplate text and a specific table to the active document. To provide the user interface, add two buttons to the Add-Ins tab by modifying the Ribbon XML file. Later in this walkthrough, you will define callback methods for the buttons. For more information about the Ribbon XML file, see Ribbon XML.
To add buttons to the Add-Ins tab
In Solution Explorer, right-click MyRibbon.xml and then click Open.
Replace the contents of the tab element with the following XML. This XML changes the label of the default control group to Content, and it adds two new buttons with the labels Insert Text and Insert Table.
<tab idMso="TabAddIns">
<group id="ContentGroup" label="Content">
<button id="textButton" label="Insert Text"
screentip="Text" onAction="OnTextButton"
supertip="Inserts text at the cursor location."/>
<button id="tableButton" label="Insert Table"
screentip="Table" onAction="OnTableButton"
supertip="Inserts a table at the cursor location."/>
</group>
</tab>