From e0a7f38d58e0131cf431d4d9193999043cfa5f9c Mon Sep 17 00:00:00 2001 From: Paddy Xu Date: Sat, 20 May 2017 15:57:52 +0300 Subject: [PATCH] Improve Office docsments support; Fix #13 (with flaws). --- .../QuickLook.Plugin.OfficeViewer/OfficeInteropWrapper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/OfficeInteropWrapper.cs b/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/OfficeInteropWrapper.cs index 79359d4..bfd4571 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/OfficeInteropWrapper.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/OfficeInteropWrapper.cs @@ -146,13 +146,13 @@ namespace QuickLook.Plugin.OfficeViewer case FileTypeEnum.Word: _wordApp = new Microsoft.Office.Interop.Word.Application(); _wordApp.DisplayAlerts = WdAlertLevel.wdAlertsNone; - _wordApp.Documents.Add(_path); + _wordApp.Documents.Open(_path); succeeded = true; break; case FileTypeEnum.Excel: _excelApp = new Application(); _excelApp.DisplayAlerts = false; - _excelApp.Workbooks.Add(_path); + _excelApp.Workbooks.Open(_path); var worksheets = _excelApp.ActiveWorkbook.Sheets; if (worksheets != null) foreach (Worksheet sheet in worksheets)