Home Saved Outlook MailItem does not yet have EntryId
Reply: 1

Saved Outlook MailItem does not yet have EntryId

Sameer Singh
Sameer Singh Published in 2017-02-02 21:57:31Z

This is a weird one.

I have a saved Outlook MailItem (.msg file) opened from outside of Outlook, that for some reason does not yet have its EntryID set:

Some context:

  • This MailItem is a saved .msg file opened from Windows Explorer, not from Outlook.
  • In my code, I originally start at the attachment and then get the MailItem as its parent.

If I inspect the MailItem while debugging, the EntryID is either null or an empty string...

... BUT if (for example) I expand m_ObjectToDataMap until I get to _rcw and expand that object's Dynamic View - that is when the EntryID gets set.

It's as if the MailItem isn't fully loaded yet, and some inspection of the values in the debugger somehow completes the initialization of the MailItem.

I have tried:

  • Waiting a few seconds with System.Threading.Thread.Sleep().
  • parent.Save() even though I know this is not a new MailItem being composed.
  • refreshing the active inspector.
  • attempting to get the MailItem via other methods instead of getting it off the attachment.

None of these fix the problem. Why does this happen? How would I fix or get around this issue? Any help would be much appreciated.

Dmitry Streblechenko
Dmitry Streblechenko Reply to 2017-02-03 07:18:12Z

Standalone MSG files do not have entry ids. This is to be expected.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.340839 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO