I have built a custom ribbon tab in Word using the Custom UI Editor. The custom ribbon tab belongs to a template, so several documents can be open at the same time, all linked to the template.
In my custom ui code I am getting the labels for some of the buttons. They should change depending certain content in the document.
What I've noticed though is that if I have two documents open and I flick between the documents, the ribbon tab is not updating (it stays put, and is reflective of whatever the last document I opened via File > Open).
Is there a way to have the ribbon refreshing depending on what document is active?
this is the first line of the ribbon code.
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="RibbonLoaded">
This is an example of me calling to get the label.
<button id="BtnH1" getLabel="RibbonControls.getLabel" onAction="RibbonControls.ButtonOnAction" />