K
Klaus Linke
Hi Tony,
Aah, bingo! Thank you, I knew my code was overly complicated!
Though it probably had a logical error, too: Say an attached template or
global template has added a button to some built-in toolbar, then the Parent
would be Normal.dot, not that template. And I would want keep the template's
..Saved flag clean, not Normal.dots.
Strange, that is exactly what I tried yesterday. Not sure what I did wrong,
but glad it does work as expected.
Thanks!
Klaus
Set myButtonTemplate = Templates(myCBB.Parent.Context)
Aah, bingo! Thank you, I knew my code was overly complicated!
Though it probably had a logical error, too: Say an attached template or
global template has added a button to some built-in toolbar, then the Parent
would be Normal.dot, not that template. And I would want keep the template's
..Saved flag clean, not Normal.dots.
Sub ToggleState(myControl As CommandBarControl, myState As String)
Strange, that is exactly what I tried yesterday. Not sure what I did wrong,
but glad it does work as expected.
Thanks!
Klaus