diff --git a/GreenshotOfficePlugin/OfficeExport/OutlookEmailExporter.cs b/GreenshotOfficePlugin/OfficeExport/OutlookEmailExporter.cs index 45221eb6a..3a1499455 100644 --- a/GreenshotOfficePlugin/OfficeExport/OutlookEmailExporter.cs +++ b/GreenshotOfficePlugin/OfficeExport/OutlookEmailExporter.cs @@ -283,6 +283,12 @@ namespace Greenshot.Interop.Office { LOG.WarnFormat("Problem while trying to add attachment to Item '{0}' : {1}", inspector.Caption, ex); return false; } + try { + inspector.Activate(); + } catch (Exception ex) { + LOG.Warn("Problem activating inspector: ", ex); + return false; + } LOG.Debug("Finished!"); return true; } diff --git a/GreenshotOfficePlugin/OfficeExport/WordExporter.cs b/GreenshotOfficePlugin/OfficeExport/WordExporter.cs index 1bf25b80e..d842994ad 100644 --- a/GreenshotOfficePlugin/OfficeExport/WordExporter.cs +++ b/GreenshotOfficePlugin/OfficeExport/WordExporter.cs @@ -142,8 +142,18 @@ namespace Greenshot.Interop.Office { } } } - wordDocument.Activate(); - wordDocument.ActiveWindow.Activate(); + try { + wordApplication.Activate(); + } catch { + } + try { + wordDocument.Activate(); + } catch { + } + try { + wordDocument.ActiveWindow.Activate(); + } catch { + } } } }