cancel
Showing results for 
Search instead for 
Did you mean: 

MessageClass Incorrectly Changing on Restored MailItem

JakeA
Level 2

I am writing a custom Outlook .NET addin that performs actions on MailItems.  This addin needed to check if the MailItem is archived before doing anything.  I am currently doing this by looking to see if the MessageClass of the MailItem is "IPM.Note" or "IPM.Note.EnterpriseVault.Shortcut".  When the user selects a new mail item, I keep a reference to that mail item. 

 

My problem is that when looking at a MailItem that is recently restored, it first shows, "IPM.Note", but later shows "IPM.Note.EnterpriseVault.Shortcut" for the MessageClass.  The inverse is true for recently stored MailItems.  If I close and re-open Outlook, all MessageClasses are properly set.

 

This seems really confusing and is keeping me from properly interacting with Enterprise Vault.  Any help would be greatly appreciated.

3 REPLIES 3

Peter_Kozak
Level 5
Partner

Hi JakeA,

 

grab Outlook Spy and take a look to the Properties of an archived Mail. There should be some properties which you can check with your addin. Even if the Item is restored there are some additional Properties.

 

What did you mean with Inverse?

 

Cheers


Peter

JakeA
Level 2

Thanks for the response.  What properties should I look for in Outlook Spy?

 

I mean that for recent stored mail items, it first shows "IPM.Note.EnterpriseVault.Shortcut", but later shows  "IPM.Note" for the MessageClass.

 

Edit: Misread second question

Message Edited by JakeA on 12-29-2008 06:20 AM

Paul_Grimshaw
Level 6
Employee Accredited Certified

There are lots of properties on the message that you could interrogate to see if the message is archived if you use Outlook Spy as previously suggested. If you select an archived message and click on the iMessage button you will get a list of properties for that item . In that list you can see out data such as Archive ID, Retention Category, saveset ID etc etc.

 

If a message has any of these then you can pretty much say that it has been archived but then there is nothing to say that this is not an orphaned shortcut but you just mentioned that you wanted to check if it has been archived.

 

I do not see the behavior that you have described on my system. If I look at a shortcut with outlook spy it has all the relevant data within it and the PR_MESSAGE_CLASS property is IPM.Note.EnterpriseVault.Shortcut and an Original Message Class property has been created with a value of IPM.Note.

 

If I restore this item then most of the EV properties on the message are now gone and the PR_MESSAGE_CLASS is back to IPM.Note and no restarting of outlook took place.