Microsoft Office VSTO addin: How to access ribbon xml controls from ThisAddIn class
问题 In my VS2019 VSTO project for WORD AddIn , I have created button in a tab by using Ribbon XML as follows. And VS2019 auto-generated the ThisAddIn.cs class shown below. Question : How can I programmatically access the button control btnButton of Ribbon XML from ThisAddIn.cs class? Remark : There are some officials such as this one that shows how to do it for a Ribbon Designer . But, I need to do it for Ribbon XML . Ribbon1.XML : <ribbon> <tabs> <tab id="TabID" label="TEST"> <group id="MyGroup"