internal void UnloadCustomUI() { // This is safe, even if no Com Add-Ins were loaded. ExcelComAddInHelper.UnloadComAddIns(); ExcelCommandBarUtil.UnloadCommandBars(); }