Office.RibbonUpdaterData interface

ボタンの有効または無効の状態など、リボンに対する変更を指定します。

注釈

要件セット: RibbonAPI 1.1

プロパティ

tabs

の呼び出しで状態が設定されているタブの requestUpdateコレクション。

プロパティの詳細

tabs

の呼び出しで状態が設定されているタブの requestUpdateコレクション。

tabs: Tab[];

プロパティ値

// Office.Tab objects are properties of ribbon updater objects that are passed to the 
// Office.ribbon.requestUpdate method. The following shows how to set the visibility of 
// a custom contextual tab.

async function showDataTab() {
    await Office.ribbon.requestUpdate({
        tabs: [
            {
                id: "CtxTab1",
                visible: true
            }
        ]});
}

// The following does the same thing in TypeScript.

const showDataTab = async () => {
    const myContextualTab: Office.Tab = { id: "CtxTab1", visible: true };
    const ribbonUpdater: Office.RibbonUpdaterData = { tabs: [ myContextualTab ] };
    await Office.ribbon.requestUpdate(ribbonUpdater);
}