Edit

Share via


Office.Group interface

Represents a group of controls on a ribbon tab.

Requirement set: RibbonApi 1.1

Remarks

Examples

/**
 * Shows or hides a contextual tab.
 */
async function setContextualTabVisibility(visible: boolean) {
    // Define a tab group of controls.
    const group: Office.Group = {
        id: "TableToolsGroup",
        controls: [
            // The controls of the group...
        ],
    };
    
    // Update the ribbon to show or hide a tab with the specified group of controls.
    await Office.ribbon.requestUpdate({
        tabs: [
            {
                id: "contextTab1",
                visible: visible,
                groups: [group],
            },
        ],
    });
}

Properties

controls

Specifies one or more of the controls in the group, such as menu items, buttons, etc.

id

Identifier of the group as specified in the manifest.

Property Details

controls

Specifies one or more of the controls in the group, such as menu items, buttons, etc.

controls?: Control[];

Property Value

Remarks

When the Group object is part of an Office.RibbonUpdaterData object passed to the requestUpdate method of Office.Ribbon, the controls properties of the various Office.Group objects specify which controls have their enabled status changed; the controls property of the Group object's parent Tab object is ignored.

id

Identifier of the group as specified in the manifest.

id: string;

Property Value

string