3.1 Ribbon

The following shows an example of a ribbon customization.

 <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
   <ribbon>
     <tabs>
       <tab idMso="TabHome" 
            visible="false" />
       <tab id="customTab" 
            insertAfterMso="TabView" 
            label="Tab">
         <group id="customGroup" 
                label="Group">
           <button id="customButton" 
                   label="Button" 
                   imageMso="HappyFace" 
                   size="large" 
                   onAction="OnButtonClicked" />
           <editBox id="customEditBox"
                    label="Edit Box"
                    onChange="OnEditBoxTextChanged" />
         </group>
       </tab>
     </tabs>
   </ribbon>
 </customUI>

This example hides the built-in tab with identifier TabHome and creates a custom tab. The custom tab contains one group, which in turn contains a button and an edit box. The button is labeled Button, displays the built-in HappyFace icon, and calls the OnButtonClicked function when it is invoked. The edit box is labeled Edit Box and calls the OnEditBoxTextChanged function when text is entered.