protected override void ExecuteAction(string ribbonId) { if (this.GetAddIn().Application.ActiveWindow.Selection.Type != Microsoft.Office.Interop.PowerPoint.PpSelectionType.ppSelectionShapes) { return; } this.StartNewUndoEntry(); Spotlight.AddSpotlightEffect(); }
protected override void ExecuteAction(string ribbonId) { if (this.GetAddIn().Application.ActiveWindow.Selection.Type != Microsoft.Office.Interop.PowerPoint.PpSelectionType.ppSelectionShapes) { return; } this.StartNewUndoEntry(); PowerPointPresentation pres = this.GetCurrentPresentation(); PowerPointSlide slide = this.GetCurrentSlide(); ClipboardUtil.RestoreClipboardAfterAction(() => { Spotlight.AddSpotlightEffect(); return(ClipboardUtil.ClipboardRestoreSuccess); }, pres, slide); }