Skip to content

Commit dd2a52d

Browse files
[WXP] Document how to change the availability status of context menu items (#4999)
* Update docs to include context menu support * Update Office requirement sets article * Update ms.date
1 parent 33b16fe commit dd2a52d

7 files changed

+179
-115
lines changed

docs/design/add-in-commands.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Basic concepts for add-in commands
33
description: Learn how to add custom ribbon buttons and menu items to Excel, Outlook, PowerPoint, and Word as part of an Office Add-in.
4-
ms.date: 10/15/2024
4+
ms.date: 03/11/2025
55
ms.topic: overview
66
ms.localizationpriority: high
77
---
@@ -22,9 +22,9 @@ There are two types of add-in commands, based on the kind of action that the com
2222
- **Task pane commands**: The button or menu item opens the add-in's [task pane](task-pane-add-ins.md). You add this kind of add-in command with markup in the manifest. The "code behind" the command is provided by Office.
2323
- **Function commands**: The button or menu item runs any arbitrary JavaScript. The code almost always calls APIs in the Office JavaScript Library, but it doesn't have to. This type of add-in typically displays no UI other than the button or menu item itself. Note the following about function commands:
2424

25-
- The runtime in which the function command runs is a full [browser-based runtime](../testing/runtimes.md#browser-runtime). It can render HTML and call out to the Internet to send or get data.
25+
- The runtime in which the function command runs is a full [browser-based runtime](../testing/runtimes.md#browser-runtime). It can render HTML and call out to the Internet to send or get data.
2626
- The runtime closes when either the function completes or 5 minutes have passed, whichever is earlier.
27-
- The function that is triggered can call the [displayDialogAsync](/javascript/api/office/office.ui?view=common-js&preserve-view=true#office-office-ui-displaydialogasync-member(1)) method to show a dialog. This is a good way to display an error, show progress, or prompt the user for input.
27+
- The function that is triggered can call the [displayDialogAsync](/javascript/api/office/office.ui?view=common-js&preserve-view=true#office-office-ui-displaydialogasync-member(1)) method to show a dialog. This is a good way to display an error, show progress, or prompt the user for input.
2828

2929
> [!NOTE]
3030
> Because of the 5-minute timeout, the dialog should be designed so that users complete their interaction and close it within 5 minutes. Your add-in should use a task pane for longer interactions.
@@ -69,12 +69,12 @@ The following command capabilities are currently supported.
6969
- Simple buttons - trigger specific actions.
7070
- Menus - simple menu dropdown with buttons that trigger actions.
7171

72-
### Default Enabled or Disabled Status
72+
### Default availability state
7373

74-
You can specify whether the command is enabled or disabled when your add-in launches, and programmatically change the setting.
74+
You can specify whether the command is available when your add-in launches, and programmatically change the setting.
7575

7676
> [!NOTE]
77-
> This feature isn't supported in all Office applications or scenarios. For more information, see [Enable and Disable Add-in Commands](disable-add-in-commands.md).
77+
> This feature isn't supported in all Office applications or scenarios. For more information, see [Change the availability of add-in commands](disable-add-in-commands.md).
7878
7979
### Position on the ribbon (preview)
8080

docs/design/contextual-tabs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create custom contextual tabs in Office Add-ins
33
description: Learn how to add custom contextual tabs to your Office Add-in.
4-
ms.date: 02/12/2025
4+
ms.date: 03/11/2025
55
ms.topic: how-to
66
ms.localizationpriority: medium
77
---
@@ -422,7 +422,7 @@ const showDataTab = async () => {
422422

423423
### Toggle tab visibility and the enabled status of a button at the same time
424424

425-
The `requestUpdate` method is also used to toggle the enabled or disabled status of a custom button on either a custom contextual tab or a custom core tab. For details about this, see [Enable and disable add-in commands](disable-add-in-commands.md). There may be scenarios in which you want to change both the visibility of a tab and the enabled status of a button at the same time. You do this with a single call of `requestUpdate`. The following is an example in which a button on a core tab is enabled at the same time as a contextual tab is made visible.
425+
The `requestUpdate` method is also used to toggle the enabled or disabled status of a custom button on either a custom contextual tab or a custom core tab. For details about this, see [Change the availability of add-in commands](disable-add-in-commands.md). There may be scenarios in which you want to change both the visibility of a tab and the enabled status of a button at the same time. You do this with a single call of `requestUpdate`. The following is an example in which a button on a core tab is enabled at the same time as a contextual tab is made visible.
426426

427427
```javascript
428428
function myContextChanges() {

0 commit comments

Comments
 (0)