0
votes

I have following scenario: A small WPF app (a prototype, proof of concept) which is supposed to programmatically create an email (fill some data in), and track down if that email was replied later (conversation tracking). Conversation ID is not available until item was sent.

The problem I faced is that when item is created and initially saved - it has one EntryId, but when item is sent, it is moved to another folder (and in case if there is more than one account, sent folder can be different from OlDefaultSent folder), when it is moved to another folder of an Exchange account its EntryId is changed, thus I am loosing a track of it.

Question is - how can I keep track of item I created when it is moved to a different folder (meaning EntryID is also changed)?

Second question here can be - how can I find my item if my app was closed while EntryId change happened?

1

1 Answers

0
votes

You can track the PR_SEARCH_KEY MAPI property (DASL name http://schemas.microsoft.com/mapi/proptag/0x300B0102) - it does not change when the message is moved between folders. You can retrieve the property using MailItem.PropertyAccessor.GetProperty, but Outlook Object Model won't let you search (Items.Find) on binary properties, you'd need Extended MAPI (C++ or Delphi) or Redemption for that.