Using MailItem.ConversationIndex to find the parent MailIteml

N

Noel Weichbrodt

I am writing a C# Outlook 2003 Add-in in Visual Studio 2003. My task is to
create a Reply to All button in the outlook Reply form, so that you may add
in all the original recipients of the message as you draft your reply. It
seems to me the easiest and best way to do that is to use the relationship
between the reply and the original message.

However, I am not finding that relationship reflected in the API of the
Outlook object model. The closest I can find is the ConversationIndex
property of the MailItem.

Starting from the ActiveInspector object, is there a way to access the
mailitem that the reply is in response to?

TIA.

Noel
 
K

Ken Slovak - [MVP - Outlook]

ConversationIndex isn't added until the item is sent. It adds an 8 byte time
structure at the end of the previous ConversationIndex value.

I don't know of an exposed property that will do what you want. There might
be one but I don't see any.

What I'd do is most likely handle the Reply button click in open Inspectors
and in Explorer.Selection and add the EntryID of the original item to the
new item in NewInspector and use that to find the original item and its
original recipients.
 
S

Sue Mosher [MVP-Outlook]

In addition to what Ken suggested, Dmitry posted some information about the ConversationIndex property a while back that might be helpful.
 
N

Noel Weichbrodt

Thanks Ken and Sue for your quite prompt & informative responses.

Ken, a follow-up question regarding your suggestion: outside of
subclassing the Inspector object, is there somewhere in the native
Inspector object that I could store that EntryID? I couldn't find
anyplace just from browsing the API.

Sue, thanks for the pointer to Dmitry's explication.

--Noel
 
K

Ken Slovak - [MVP - Outlook]

Not in the Inspector, but in Inspector.CurrentItem. I just create a user
property if I don't care if it's visible to the user or a MAPI property in
the PS_PUBLIC_STRINGS space if I want it hidden.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top