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
This commit is contained in:
RKrom 2012-08-15 16:26:24 +00:00
commit 229276cae9

View file

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