You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This request is to break out the part of the sample that shows how to manage Ribbon buttons being enabled or disabled based on context of the UI and user actions. The goal is to show how to use the Ribbon management APIs documented at Enable and Disable Add-in Commands
The sample should have the following Ribbon buttons.
Connect. This pretends to connect to some backend service. The only actual action is that it enables the other buttons (Disconnect, Insert data). Connect is disabled when Disconnect is enabled (these two toggle).
Disconnect. This pretends to disconnect from a backend service. It disables itself, and the Insert data button. It enables the Connect button.
Insert data. Inserts a mock table of data into the spreadsheet (this can be the same data from the original sample). The table is named so that you can hook up events to it.
Sum. This button is connect to a table selection changed even (which the original sample has code for). When in the table, the button is enabled. When outside of the table, it is disabled. if the table does not exist, it is disabled.
Additional notes:
The Sum button should be connected to the table selection changed event from Office.Initialize (if the table exists such as from a saved document)
There is no task pane. So this is a cool way to show that you can run code without a task pane.
You'll still need a global state object of some sort to track button state, and update it as the buttons are used and toggled.
The text was updated successfully, but these errors were encountered:
We're breaking the large scenario Manage ribbon and task pane UI, and run code on doc open into smaller bite-size samples.
This request is to break out the part of the sample that shows how to manage Ribbon buttons being enabled or disabled based on context of the UI and user actions. The goal is to show how to use the Ribbon management APIs documented at Enable and Disable Add-in Commands
The sample should have the following Ribbon buttons.
Additional notes:
The text was updated successfully, but these errors were encountered: