I have the following ribbon.xml in my vsto add-in word:
<tab id="TabLetters" getVisible="IsLettersTabVisible" label="Letters">
<group id="LettersGroup" label="Letters">
<toggleButton id="NewWithTemplate"
label="New using template Controls"
size="large"
imageMso="FileNew"
onAction="NewTemplated" />
</toggleButton>
</group>
</tab>
And the following code after the click event:
public void NewTemplated(Office.IRibbonControl control, bool value)
{
CloseDocument();
var doc = Globals.ThisAddIn.Application.Documents.Add(Template: @"LETTER_V2.dotx", Visible: true);
doc.Activate();
_ribbon.ActivateTab("TabLetters");
}
I would expect this to lead to the appearance of a new window with the ribbon tab open, however it will only remain on the HOME tab, which is visible / current. How to make my tab visible?
source
share