// ribbon callback public void OnButtonPressed(Microsoft.Office.Core.IRibbonControl control) { //string ExcelWBName = MyApp.ExcelApp.ActiveWorkbook.Name; //Debug.WriteLine(ExcelWBName); MyApp.ExportNamedRanges(); ButtonPressedEventArgs args = new ButtonPressedEventArgs { ControlId = control }; OnButtonPressedEvent(args); }
public void OnAction(Microsoft.Office.Core.IRibbonControl control) { Debug.WriteLine(control.Id); MyApp.ExportNamedRanges(); }