message id for Outlook email?

K

Keithen

I am building an Outlook Addin with VB .NET that does archiving. When
i process the MailItems in a folder, i check the target folder to see if the
email has already been archived. If not, i copy and then move the
MailItem to the target folder. My employer told me to check the
message id in the mail header to see if the new email matched any in
the target archive folder. Most of what i think of as the message header
appears in the MailItem as properties such as "To" and "Subject". There
is even an "EntryID" property. If i try to use the entry id to compare, i
find that the copy action creates a message with a new entry id, so it
will not match. Since it is read only, i cannot stuff the original id into
the copy. So i have multiple questions that could get me what i want: 1.
Is there another message id that i am missing that stays constant as a
message is copied? 2. Or is there another way to tag the archived copy
so i don't have to compare a list of other properties to see if the
MailItem is unique?
 
K

Keithen

Just wanted to pass on the reply to the same question i got from Ken
Slovak on the microsoft.public.outlook.program_vba message board:

EntryID is per item and uniquely identifies an item in an InfoStore.

Add a user defined property to the UserProperties collection of the
item and use that to compare with your original item.
 

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