diff --git a/Greenshot/Destinations/EmailDestination.cs b/Greenshot/Destinations/EmailDestination.cs index 2ce2d48ee..24fcd113e 100644 --- a/Greenshot/Destinations/EmailDestination.cs +++ b/Greenshot/Destinations/EmailDestination.cs @@ -210,6 +210,19 @@ namespace Greenshot.Destinations { if (outlookInspectorCaption != null) { OutlookEmailExporter.ExportToInspector(outlookInspectorCaption, tmpFile, attachmentName); } else { + if (!manuallyInitiated) { + Dictionary inspectorCaptions = OutlookEmailExporter.RetrievePossibleTargets(conf.OutlookAllowExportInMeetings); + if (inspectorCaptions != null && inspectorCaptions.Count > 0) { + List destinations = new List(); + destinations.Add(new EmailDestination()); + foreach (string inspectorCaption in inspectorCaptions.Keys) { + destinations.Add(new EmailDestination(inspectorCaption, inspectorCaptions[inspectorCaption])); + } + ContextMenuStrip menu = PickerDestination.CreatePickerMenu(false, surface, captureDetails, destinations); + PickerDestination.ShowMenuAtCursor(menu); + return false; + } + } OutlookEmailExporter.ExportToOutlook(conf.OutlookEmailFormat, tmpFile, captureDetails.Title, attachmentName); } surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.exported_to, Description)); diff --git a/Greenshot/Destinations/PowerpointDestination.cs b/Greenshot/Destinations/PowerpointDestination.cs index c8b3a18ef..d51fa727f 100644 --- a/Greenshot/Destinations/PowerpointDestination.cs +++ b/Greenshot/Destinations/PowerpointDestination.cs @@ -125,7 +125,7 @@ namespace Greenshot.Destinations { } else { if (!manuallyInitiated) { List presentations = PowerpointExporter.GetPowerpointPresentations(); - if (presentations.Count > 0) { + if (presentations != null && presentations.Count > 0) { List destinations = new List(); destinations.Add(new PowerpointDestination()); foreach (string presentation in presentations) { diff --git a/Greenshot/Destinations/WordDestination.cs b/Greenshot/Destinations/WordDestination.cs index 055443465..5c9c8eb0a 100644 --- a/Greenshot/Destinations/WordDestination.cs +++ b/Greenshot/Destinations/WordDestination.cs @@ -124,7 +124,7 @@ namespace Greenshot.Destinations { } else { if (!manuallyInitiated) { List documents = WordExporter.GetWordDocuments(); - if (documents.Count > 0) { + if (documents != null && documents.Count > 0) { List destinations = new List(); destinations.Add(new WordDestination()); foreach (string document in documents) {