RibbonButtonで構築されたExcel 2010をExcelのVSTOアドインから有効にすることはできますか?ExcelビルトインのRibbonButtonを無効にするにはどうすればよいですか?
私は次のことを試してみました:
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;
}
をしかし、これは唯一の右クリックコンテキストメニューのために働くようです。リボンのボタンではありません。
非常に便利なリンクです。 tnx – zdrsh