Search code examples
javascriptoffice-jsoutlook-addinoffice-addinsoutlook-web-addins

Outlook "Command Add-in" Button Border


I developed an Outlook Add-in with a Taskpane and a Command Add-in, using the Yo Office Tool with a Web Add-in and Javascript as Code base. So far everything works like we wanted it except for the Command Add-in where we would like to visually tell the user the actual state of the command. Like with either a changed Icon and Text combination (aka a Toggle Button like the Outlook Dark Mode Add-in) or a Border around the Add-in Command Button. Just like it, right now, works for embedded outlook Add-ins and COM Add-ins too. See this screenshot: Outlook Add-ins with Toggle function or Button Border

I am searching the Web for days now for an answer or a hint. Also, I have gone through the Add-in samples but could not find something which would lead me into the right direction. I've read on a post here Outlook Add-in - Dynamic Control Button Highlight On Click that for Web Add-ins this function is not implemented yet, same as Callback functionality. But my Web based Add-in do have and use Callbacks, and they work. So my Question is: Is there a way how I can use Button Toggle or Button Border with a Web Add-in, or does this only work with COM Add-ins?


Solution

  • Have you seen this page https://learn.microsoft.com/en-us/office/dev/add-ins/design/disable-add-in-commands

    The example is enabling or disabling a control, but I think you should be able to adjust other properties (like text and icon) as well.

    Update:
    I found out from someone more knowledgeable than me about Outlook that the feature I linked is for Word, Excel, and PowerPoint and has not been ported to Outlook yet. We track Outlook add-in feature requests on our Tech Community Page. Please submit your request there and choose the appropriate label(s). Feature requests on Tech Community are considered when we go through our planning process.

    Github Label: “Type: product feature request”
    https://aka.ms/M365dev-suggestions