OfficeDev / Office-Add-in-samples

Code samples for Office Add-in development on the Microsoft 365 platform.
MIT License
749 stars 805 forks source link

Outlook Add-in Compose - Dynamic Control Button Text Updating #276

Closed j0hnw0rk3r closed 2 years ago

j0hnw0rk3r commented 2 years ago

Note: This repo is only for questions related to its samples. If you have questions about how to use office.js or the Office developer platform, please post your question on https://stackoverflow.com. Tag your question with office-js or outlook-web-addins

Question

I developed an add-in built with yo generator (Node.js) that works as a configurator which enables the outlook compose to enable/disable sending a copy of the new email to a custom url on-send.

There's a control button added that says 'Toggle Send to cCRM' but I would prefer a toggle text dynamically from 'Enable send to cCRM' to 'Disable send to cCRM' and vice-versa when clicking the control button to improve UI experience. Is it possible to accomplish?

AlexJerabek commented 2 years ago

Closing as a duplicate of https://github.com/OfficeDev/office-js-docs-pr/issues/3282.