private void buttonDelete_Click(object sender, RibbonControlEventArgs e) { if (Globals.ThisAddIn.Application.ActivePresentation != null) { PowerPoint2010OfficeDocument document = new PowerPoint2010OfficeDocument(Globals.ThisAddIn.Application.ActivePresentation); document.Delete(); } }