mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 14:03:23 -07:00
Fixed Outlook "program access pop-up" for Outlook 2003
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1793 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
1b4bb9439e
commit
63cfb8b3ee
1 changed files with 10 additions and 7 deletions
|
@ -441,7 +441,7 @@ namespace Greenshot.Interop.Office {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="outlookApplication"></param>
|
/// <param name="outlookApplication"></param>
|
||||||
private static void InitializeVariables(IOutlookApplication outlookApplication) {
|
private static void InitializeVariables(IOutlookApplication outlookApplication) {
|
||||||
if (outlookApplication == null) {
|
if (outlookApplication == null || outlookVersion != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -450,6 +450,8 @@ namespace Greenshot.Interop.Office {
|
||||||
} catch (Exception exVersion) {
|
} catch (Exception exVersion) {
|
||||||
LOG.Error(exVersion);
|
LOG.Error(exVersion);
|
||||||
}
|
}
|
||||||
|
// Preventing retrieval of currentUser if Outlook is older than 2007
|
||||||
|
if (outlookVersion.Major >= 12) {
|
||||||
try {
|
try {
|
||||||
INameSpace mapiNamespace = outlookApplication.GetNameSpace("MAPI");
|
INameSpace mapiNamespace = outlookApplication.GetNameSpace("MAPI");
|
||||||
currentUser = mapiNamespace.CurrentUser.Name;
|
currentUser = mapiNamespace.CurrentUser.Name;
|
||||||
|
@ -458,6 +460,7 @@ namespace Greenshot.Interop.Office {
|
||||||
LOG.Error(exNS);
|
LOG.Error(exNS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Call this to get the running outlook application, returns null if there isn't any.
|
/// Call this to get the running outlook application, returns null if there isn't any.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue