private void button1_Click(object sender, RibbonControlEventArgs e) { Excel.Workbook currentWorkBook = Globals.ThisAddIn.Application.ActiveWorkbook; PdfConverter XlsxToPdfAspose = new PdfConverter(); XlsxToPdfAspose.ConvertXlsxToPdfWithAspose(currentWorkBook.Path, currentWorkBook.Name); }