Office.ContextMenuControl interface
個々のコンテキスト メニュー コントロールとその状態を表します。
詳細については、「 アドイン コマンドの可用性を変更する」を参照してください。
注釈
要件セット: ContextMenuAPI 1.1
例
// Change the availability of custom buttons on the context menu.
await Office.contextMenu.requestUpdate({
controls: [
{
id: Addin.CtxMenu.Button1,
enabled: true
},
{
id: Addin.CtxMenu.Button2,
enabled: false
},
]
});
プロパティの詳細
enabled
コントロールがコンテキスト メニューで使用できるかどうかを示します。
enabled?: boolean;
プロパティ値
boolean
id
マニフェストで指定されたコンテキスト メニュー コントロールの識別子。
id: string;
プロパティ値
string