Help with X-Headers and forwarded/replied emails.

S

Sanjay

Hello --
I have a C# plugin for Outlook 2k3 that sets predefined message
classifications in X-Headers using redemption. The issue is that those
headers are not inherited by the new item that is created whenever a
mail is forwarded or replied to. I need help with either getting the
headers of the original message or any ideas on where to store the
classification information so that it will be available in replies and
forwards..

Thanks

Sanjay
 
K

Ken Slovak - [MVP - Outlook]

A reply or forward is a brand new item. You would need to add the same
information in the X-header to the new item or to a user property or named
property. You might need to use the conversation topic and conversation
index properties to find the original or preceding item in a conversation to
pick up that information from the earlier item and add it to the new item.
 
S

Sanjay

I would like to use ItemProperty or UserProperty instead.. but for some
reason they are not available in the response mailitem until the item
is saved.. is there some other way to get access to the properties of
the original message?
 
K

Ken Slovak - [MVP - Outlook]

The way to get the original message is what I indicated.

You certainly can add something to the UserProperties collection of an item
without saving it first, I do that all the time. Of course to preserve the
property you would have to save or send it.
 
S

Sanjay

Ken --

Thanks for your reply.. I tried to get to the PR_CONVERSATION_TOPIC /
PR_CONVERSATION_INDEX property of the response mailitem in the
mailitem_open event. Those properties are not available. Do you have
some sample code I could use?

Here is what I am trying to do. I have a UI element in the inspector
whose value is set to the value of a custom property I set. So when a
user opens a mail item, the property is read and value for the element
is set. Now when the user replies or forwards this message, I have to
set the value of the UI element in the new message. This value has to
be same as the value in the original message. I try to do this in the
MailItem_Open event. But those properties are not available in the
MailItem_Open event for response.

Sample code would help a lot..

Thanks

Sanjay
 
K

Ken Slovak - [MVP - Outlook]

If the properties aren't available then I can't help you. Using Outlook
object model code they would be Item.ConversationIndex and
Item.ConversationTopic.
 

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