View Single Post
 
Old 03-13-2023, 05:11 AM
Ddadoo57 Ddadoo57 is offline Windows 11 Office 2021
Advanced Beginner
 
Join Date: Feb 2023
Posts: 73
Ddadoo57 is on a distinguished road
Default How to dynamically grey out a button in customUI.xml in a ribbon of word ?

Hello,

I have in a customUI.xlm for a dotm word template,
- a <gallery... element
- and several <button... elements inside

When loading the file, everything goes fine, depending on certain conditions, some buttons are grayed out and others not. I handle this through the getEnabled(...) callback.

The problem I have is that I can't do the same thing dynamically. I would like to every time I click or unroll the <gallery... element, check some conditions and then dynamically grey out either button .

Would anyone be so kind as to help me?

Thank you!
David
Reply With Quote