From 229276cae9d886c16fd718eeb1186d37ddb55bae Mon Sep 17 00:00:00 2001 From: RKrom Date: Wed, 15 Aug 2012 16:26:24 +0000 Subject: [PATCH] Fixed Outlook export issue when creating a new email, this was caused by wrong version detection code. git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1994 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- GreenshotInterop/OfficeExport/OutlookEmailExporter.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GreenshotInterop/OfficeExport/OutlookEmailExporter.cs b/GreenshotInterop/OfficeExport/OutlookEmailExporter.cs index 4063f3a68..774ec2e21 100644 --- a/GreenshotInterop/OfficeExport/OutlookEmailExporter.cs +++ b/GreenshotInterop/OfficeExport/OutlookEmailExporter.cs @@ -36,7 +36,7 @@ namespace Greenshot.Interop.Office { public class OutlookEmailExporter { private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(OutlookEmailExporter)); private static readonly string SIGNATURE_PATH = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"Microsoft\Signatures"); - private static Version outlookVersion = new Version(1, 1, 1, 1); + private static Version outlookVersion = null; private static string currentUser = null; // The signature key can be found at: @@ -474,6 +474,8 @@ namespace Greenshot.Interop.Office { LOG.InfoFormat("Using Outlook {0}", outlookVersion); } catch (Exception exVersion) { LOG.Error(exVersion); + LOG.Warn("Assuming outlook version 1."); + outlookVersion = new Version(1, 1, 1, 1); } // Preventing retrieval of currentUser if Outlook is older than 2007 if (outlookVersion.Major >= 12) {