theChrisKent
theChrisKent

Reputation: 15099

VSTO Outlook 2007 unique message ID

I am creating an Outlook 2007 add-in using VSTO. I need to store information (entered by the user) about each email. My first thought is to create a small "database" that references each email as necessary. But I can't seem to find an accessible identifier for each email for this purpose. Is there an ID or some other unique field that is available for each mail message item that I can use?

C# or VB.NET code is fine. Hopefully this can be some easy points for you!

Thanks in Advance!

Upvotes: 2

Views: 2361

Answers (2)

Tyrant
Tyrant

Reputation: 510

Outlook items have a unique EntryID and StoreID and you need them both to find the item later.
For example, if you create a database that references Outlook emails, you might want a method for finding & opening the email in Outlook.

To retrieve an Outlook item, you need to know its EntryID and StoreID so you can pass the values to NameSpace.GetItemFromID(EntryIDItem, EntryIDStore)

You can read more about it here: http://msdn.microsoft.com/en-us/library/office/bb206749(v=office.12).aspx

Upvotes: 1

Fionnuala
Fionnuala

Reputation: 91306

The mail item has a number of properties, including EntryID Property. You can also add custom properties.

Upvotes: 4

Related Questions