How to disable button created using RibbonUI.xml on the fly?

Oct 1, 2015 at 2:30 AM
Hi All,

I've created an Addin for Word using RibbonUI.xml for the toolbar and buttons.
How can I disable a button e.g. after the user closed the Word doc?


Oct 7, 2015 at 8:10 AM
Edited Oct 7, 2015 at 8:10 AM
I think you should call invalidate on ribbonui, this will cause the callbacks to be invoked. If you've implemented a callback for GetEnabled, I think that shul do it
Oct 9, 2015 at 11:25 AM
Ok, I will try it.