MS-Excel / General Formatting

Customizing an Existing Group

If you have one or two macros that you want to add to the Ribbon and those macros are related to the controls in a built-in group, you can add controls for those macros to the group. To work with a built-in group, you use the <group> element with the following (simplified) syntax:

<group idMso="ID" visible="true|false"/>
ID
The unique string identifier for the built-in group.

The value of the idMso attribute takes one of the following forms:

  • GroupName-This is the most common form and it's used for most regular built-in groups. Here, Name is the name that appears under the group, with spaces removed. For example, the isMso value for Word's Font group (Home tab) is GroupFont, and the value for Excel's Function Library group (Formulas tab) is GroupFunctionLibrary.
  • GroupTabName-This form combines the Tab in which the group appears and the Name of the group. For example, the idMso value for Word's Text group on the Insert tab is GroupInsertText.
  • GroupNameApplication-This is the form used for groups that are common to multiple applications. Here, Name is the name of the group and Application is the name of the application. So the isMso value for Word's Themes group (Page Layout tab) is GroupThemesWord, whereas the value for Excel's Themes group is GroupThemesExcel.

Again, the group names aren't fully consistent across the Office 2007 applications.

You'll work with built-in tabs in more detail later in this tutorial when you learn how to add controls to existing tabs. For now, you can use the visible attribute to hide built-in groups that you don't want the user to see. For example, the following XML code hides the Macros group (View tab):

<tab idMso="TabView">
    <group idMso="GroupMacros" visible="false" />
</tab>
[Previous] [Contents]