Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…alendarSync into release

Closes #1379
  • Loading branch information
phw198 committed Feb 26, 2022
2 parents 8513447 + d540b98 commit 39deab5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/OutlookGoogleCalendarSync/OutlookOgcs/OutlookCalendar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,8 @@ public static void AttachToOutlook(ref Microsoft.Office.Interop.Outlook.Applicat
log.Info("Attaching to the already running Outlook process.");
try {
oApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Outlook.Application") as Microsoft.Office.Interop.Outlook.Application;
if (oApp == null)
throw new ApplicationException("GetActiveObject() returned NULL without throwing an error.");
} catch (System.Exception ex) {
if (OGCSexception.GetErrorCode(ex) == "0x800401E3") { //MK_E_UNAVAILABLE
log.Warn("Attachment failed - Outlook is running without GUI for programmatic access.");
Expand Down

0 comments on commit 39deab5

Please sign in to comment.