Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Office.ContextMenuUpdaterData interface

Package:
office

Represents the changes to the context menu.

To learn more, see Change the availability of add-in commands.

Remarks

Requirement set: ContextMenuApi 1.1

Used by

Properties

controls

Collection of context menu controls whose state is set using Office.contextMenu.requestUpdate.

Property Details

controls

Collection of context menu controls whose state is set using Office.contextMenu.requestUpdate.

controls: ContextMenuControl[];

Property Value

Examples

// 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
 },
 ]
});

Feedback

Was this page helpful?