c# - Word add-in - ribbon -


i've create 2 buttons in word add-in ribbon : button1 , button2

when open doc of type 1 display button1 , same thing when open second type of doc display button2.

the problem when open example first document, , leave open, , after open second document second type find button1 in ribbon.

how can force second document display button2 , not button1 if first document still open.

during document change event invalidate(refresh) ribbon.

private office.iribbonui ribbon; public void ribbon_load(office.iribbonui ribbonui) { globals.thisaddin.application.documentchange += documentchangeevent; }  private void documentchangeevent() { ribbon.invalidate(); } 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -