According to what I am reading, an email stored in MSFT Exchange should have a valid EntryID. I am specifically trying to retrieve the EntryID of a received Outlook MailItem located in the user's inbox, and my String.IsNullOrEmpty() is returning true.
Stranger still, if the user retries (random time later), the EntryID is valid (non null).
Could there be some setting affecting the Outlook cache of the objects? It "feels" like the MailItem is only partially downloaded or something. This theory is furthered by the fact that the MailItem is selected in the Explorer Window, but a call (soon after the get-entryID) to the following:
Dim oAtt As Outlook.Attachment = oAttachments.Add(obj, Outlook.OlAttachmentType.olByValue) (obj is the mailitem retrieved from the Selection - which is non-null) results in:
System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.