From 2caa0d3d55d26af15e941653da07288d93f8ecd8 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 26 Jan 2017 15:06:20 +0100 Subject: [PATCH] BUG-2125: Another fix for DISP_E_TYPEMISMATCH [skip ci] --- GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs b/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs index 98ee9f834..83d7a6255 100644 --- a/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs +++ b/GreenshotOfficePlugin/OfficeExport/OneNoteExporter.cs @@ -45,7 +45,8 @@ namespace Greenshot.Interop.Office { OneNotePage newPage = new OneNotePage(); string unfiledNotesSectionId = GetSectionId(oneNoteApplication, SpecialLocation.slUnfiledNotesSection); if(unfiledNotesSectionId != null) { - string pageId; + // ReSharper disable once RedundantAssignment + string pageId = ""; oneNoteApplication.CreateNewPage(unfiledNotesSectionId, out pageId, NewPageStyle.npsDefault); newPage.ID = pageId; // Set the new name, this is automatically done in the export to page