Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-13-2023, 05:11 AM
Ddadoo57 Ddadoo57 is offline How to dynamically grey out a button in customUI.xml in a ribbon of word ? Windows 11 How to dynamically grey out a button in customUI.xml in a ribbon of word ? Office 2021
Advanced Beginner
How to dynamically grey out a button in customUI.xml in a ribbon of word ?
 
Join Date: Feb 2023
Posts: 71
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
  #2  
Old 03-13-2023, 05:32 AM
Ddadoo57 Ddadoo57 is offline How to dynamically grey out a button in customUI.xml in a ribbon of word ? Windows 11 How to dynamically grey out a button in customUI.xml in a ribbon of word ? Office 2021
Advanced Beginner
How to dynamically grey out a button in customUI.xml in a ribbon of word ?
 
Join Date: Feb 2023
Posts: 71
Ddadoo57 is on a distinguished road
Default

I may have to do this through the <dynamicMenu... element ?
Reply With Quote
  #3  
Old 03-13-2023, 06:02 AM
Ddadoo57 Ddadoo57 is offline How to dynamically grey out a button in customUI.xml in a ribbon of word ? Windows 11 How to dynamically grey out a button in customUI.xml in a ribbon of word ? Office 2021
Advanced Beginner
How to dynamically grey out a button in customUI.xml in a ribbon of word ?
 
Join Date: Feb 2023
Posts: 71
Ddadoo57 is on a distinguished road
Default

Yes that's right, you have to go through <dynamicMenu... element! I just did a first test and it seems to work very well!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing CustomUI when saving word file from template Cosmo Word 13 09-18-2022 01:34 AM
Smaller Ribbon Button Size edubs77 Office 1 11-23-2019 02:02 AM
How to dynamically grey out a button in customUI.xml in a ribbon of word ? How do I attach a ribbon button to a particular template in Word 2010? HelenT Word VBA 1 10-07-2015 03:32 AM
How to dynamically grey out a button in customUI.xml in a ribbon of word ? Custom ribbon button or shortcut for a specific function Nicobisgaard Word 6 04-22-2015 04:39 AM
Ribbon button - showLabel attribute ignored yiannis.spyridakis Excel Programming 2 06-12-2012 11:21 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:08 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft