BUG-2125: Another fix for DISP_E_TYPEMISMATCH [skip ci]

This commit is contained in:
Robin 2017-01-26 15:06:20 +01:00
commit 2caa0d3d55

View file

@ -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