Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Office.ContextMenuControl interface
- Package:
- office
Represents an individual context menu control and its state.
To learn more, see Change the availability of add-in commands.
Remarks
Requirement set: ContextMenuApi 1.1
Used by
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
},
]
});
Properties
| enabled | Indicates whether the control is available on the context menu. |
| id | Identifier of the context menu control as specified in the manifest. |
Property Details
enabled
Indicates whether the control is available on the context menu.
enabled?: boolean;
Property Value
boolean
id
Identifier of the context menu control as specified in the manifest.
id: string;
Property Value
string
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins
Feedback
Was this page helpful?
