コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }