Is it possible to set an excel 2010 built in RibbonButton to enabled=false from an excel VSTO Add-In?
I tried the following:
CommandBarControls controlls=Globals.ThisAddIn.Application.CommandBars.FindControls(MsoControlType.msoControlButton, 7374, null, false);
/// 7374 is the office control id of the control I want to access
foreach (CommandBarControl control in controlls)
{
control.Enabled = false;
}
But this seems to work only for the right click context menu. And not for the ribbon buttons.