/// <summary>
        /// A method to retrieve all inspectors which can act as an export target
        /// </summary>
        /// <returns>List<string> with inspector captions (window title)</returns>
        public static IDictionary <string, OlObjectClass> RetrievePossibleTargets()
        {
            IDictionary <string, OlObjectClass> inspectorCaptions = new SortedDictionary <string, OlObjectClass>();

            try {
                using (IOutlookApplication outlookApplication = GetOutlookApplication()) {
                    if (outlookApplication == null)
                    {
                        return(null);
                    }

                    if (outlookVersion.Major >= (int)OfficeVersion.OFFICE_2013)
                    {
                        // Check inline "panel" for Outlook 2013
                        using (var activeExplorer = outlookApplication.ActiveExplorer()) {
                            if (activeExplorer != null)
                            {
                                using (var inlineResponse = activeExplorer.ActiveInlineResponse) {
                                    if (canExportToInspector(inlineResponse))
                                    {
                                        OlObjectClass currentItemClass = inlineResponse.Class;
                                        inspectorCaptions.Add(activeExplorer.Caption, currentItemClass);
                                    }
                                }
                            }
                        }
                    }

                    using (IInspectors inspectors = outlookApplication.Inspectors) {
                        if (inspectors != null && inspectors.Count > 0)
                        {
                            for (int i = 1; i <= inspectors.Count; i++)
                            {
                                using (IInspector inspector = outlookApplication.Inspectors[i]) {
                                    string inspectorCaption = inspector.Caption;
                                    using (IItem currentItem = inspector.CurrentItem) {
                                        if (canExportToInspector(currentItem))
                                        {
                                            OlObjectClass currentItemClass = currentItem.Class;
                                            inspectorCaptions.Add(inspector.Caption, currentItemClass);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            } catch (Exception ex) {
                LOG.Warn("Problem retrieving word destinations, ignoring: ", ex);
            }
            return(inspectorCaptions);
        }
        /// <summary>
        /// Export the image stored in tmpFile to the Inspector with the caption
        /// </summary>
        /// <param name="inspectorCaption">Caption of the inspector</param>
        /// <param name="tmpFile">Path to image file</param>
        /// <param name="attachmentName">name of the attachment (used as the tooltip of the image)</param>
        /// <returns>true if it worked</returns>
        public static bool ExportToInspector(string inspectorCaption, string tmpFile, string attachmentName)
        {
            using (IOutlookApplication outlookApplication = GetOrCreateOutlookApplication()) {
                if (outlookApplication == null)
                {
                    return(false);
                }
                if (outlookVersion.Major >= (int)OfficeVersion.OFFICE_2013)
                {
                    // Check inline "panel" for Outlook 2013
                    using (var activeExplorer = outlookApplication.ActiveExplorer()) {
                        if (activeExplorer == null)
                        {
                            return(false);
                        }
                        var currentCaption = activeExplorer.Caption;
                        if (currentCaption.StartsWith(inspectorCaption))
                        {
                            using (var inlineResponse = activeExplorer.ActiveInlineResponse) {
                                using (IItem currentItem = activeExplorer.ActiveInlineResponse) {
                                    if (canExportToInspector(inlineResponse))
                                    {
                                        try {
                                            return(ExportToInspector(activeExplorer, currentItem, tmpFile, attachmentName));
                                        } catch (Exception exExport) {
                                            LOG.Error("Export to " + currentCaption + " failed.", exExport);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                using (IInspectors inspectors = outlookApplication.Inspectors) {
                    if (inspectors == null || inspectors.Count == 0)
                    {
                        return(false);
                    }
                    LOG.DebugFormat("Got {0} inspectors to check", inspectors.Count);
                    for (int i = 1; i <= inspectors.Count; i++)
                    {
                        using (IInspector inspector = outlookApplication.Inspectors[i]) {
                            string currentCaption = inspector.Caption;
                            if (currentCaption.StartsWith(inspectorCaption))
                            {
                                using (IItem currentItem = inspector.CurrentItem) {
                                    if (canExportToInspector(currentItem))
                                    {
                                        try {
                                            return(ExportToInspector(inspector, currentItem, tmpFile, attachmentName));
                                        } catch (Exception exExport) {
                                            LOG.Error("Export to " + currentCaption + " failed.", exExport);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return(false);
        }