1

Is there support with outlook add-in's having different icons for light and dark modes?

I looked through the documentation and don't see a way to specify the icon based off light and dark mode.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
deggen
  • 33
  • 3

1 Answers1

0

If you asked about Office web add-ins, the Office JavaScript API doesn't provide anything for that. I'd suggest posting this as a feature request or vote for an existing feature request (if it exists already) on Tech Community where they are considered when the Office dev team goes through the planning process.

In case of COM add-ins (or read VSTO add-ins) you may consider implementing the getImage callback and use the IRibbonUI.Invalidate method to get your callback called by the Office application to load an appropriate icon. For example, if an add-in writer implements the getImage callback procedure for a button, the function is called once, the image loads, and then if the image needs to be updated, the cached image is used instead of recalling the procedure. This process remains in place until the add-in signals that the cached values are invalid by using the Invalidate method, at which time, the callback procedure is again called and the return response is cached. The add-in can then force an immediate update of the UI by calling the Refresh method.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45