/// <summary> /// Open protected workbook event /// </summary> void OnProtectedExcelWorkbookOpen(ExcelInterop.ProtectedViewWindow Pvw) { AddNewTaskPane(protectedWorkbookIdentifier + Pvw.Workbook.Name); //When CSV files are opened. Events are fired in wrong order! //Workbook Activate is caled before Workbook Open. We require Activate to be called *after* Open //TODO: Need to investigate why this is so if (Pvw.Workbook.FileFormat == ExcelInterop.XlFileFormat.xlCSV) { OnProtectedExcelWorkbookActivate(Pvw); } }
private void ProtectedViewWindowOpen(Excel.ProtectedViewWindow Pvw) { // set UI as nonfunctional setUIState(null); }
/// <summary> /// /// </summary> void OnProtectedExcelWorkbookBeforeClose(ExcelInterop.ProtectedViewWindow Pvw, ExcelInterop.XlProtectedViewCloseReason Reason, ref bool Cancel) { RemoveTaskPane(protectedWorkbookIdentifier + Pvw.Workbook.Name); }
/// <summary> /// On protected excel workbook activate /// </summary> void OnProtectedExcelWorkbookActivate(ExcelInterop.ProtectedViewWindow Pvw) { SetCurrentTaskPane(protectedWorkbookIdentifier + Pvw.Workbook.Name); }