protected override void ExecuteAction(string ribbonId) { PowerPointPresentation presentation = this.GetCurrentPresentation(); PowerPointSlide slide = this.GetCurrentSlide(); Selection selection = this.GetCurrentSelection(); if (!ShapeUtil.IsSelectionShape(selection) || selection.ShapeRange.Count < 2) { MessageBox.Show("Please select more than one shape.", "Error"); return; } ShapeRange result = AddIntoGroup.Execute(presentation, slide, selection); result.Select(); }
protected override void ExecuteAction(string ribbonId) { PowerPointPresentation presentation = this.GetCurrentPresentation(); PowerPointSlide slide = this.GetCurrentSlide(); Selection selection = this.GetCurrentSelection(); if (!ShapeUtil.IsSelectionShape(selection) || selection.ShapeRange.Count < 2) { MessageBox.Show(TextCollection.ShortcutsLabText.AddIntoGroupActionHandlerReminderText, TextCollection.CommonText.ErrorTitle); return; } ShapeRange result = AddIntoGroup.Execute(presentation, slide, selection); result.Select(); }