Hi, Is the EntryID property for an Outlook Folder guaranteed to be unique across multiple mail stores? My Outlook add in currently persists the only the EntryID of a folder selected by the user (typically in his default mail store, but theoretically could be from any of the stores available to the user) so as to be able to reference that folder. So when I need a reference to this folder, I use Namespace.GetFolderFromID(mySpecialFoldersEntryID), without specifying a StoreID. Is this guaranteed to work even if the user subsequently decides to configure multiple stores of any type? Or will I need to persist the StoreID of the folder as well?
It should be unique but best practice is to use both EntryID and StoreID, so if I were you I'd persist both and use both. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm wrote in message news:15d22319-1606-43a8-bcc3-7f7c7387b447@q27g2000prf.googlegroups.com... > Hi, > > Is the EntryID property for an Outlook Folder guaranteed to be unique > across multiple mail stores? My Outlook add in currently persists the > only the EntryID of a folder selected by the user (typically in his > default mail store, but theoretically could be from any of the stores > available to the user) so as to be able to reference that folder. So > when I need a reference to this folder, I use > Namespace.GetFolderFromID(mySpecialFoldersEntryID), without specifying > a StoreID. Is this guaranteed to work even if the user subsequently > decides to configure multiple stores of any type? Or will I need to > persist the StoreID of the folder as well? >
If the parent store hasn't been touched in the current session, GetFolderFromID will fail if no store id is specified - MAPI woudl have no clue which provider is responsible for the given fodler entry id - store providers register themselves when loaded. -- Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool - wrote in message news:15d22319-1606-43a8-bcc3-7f7c7387b447@q27g2000prf.googlegroups.com... > Hi, > > Is the EntryID property for an Outlook Folder guaranteed to be unique > across multiple mail stores? My Outlook add in currently persists the > only the EntryID of a folder selected by the user (typically in his > default mail store, but theoretically could be from any of the stores > available to the user) so as to be able to reference that folder. So > when I need a reference to this folder, I use > Namespace.GetFolderFromID(mySpecialFoldersEntryID), without specifying > a StoreID. Is this guaranteed to work even if the user subsequently > decides to configure multiple stores of any type? Or will I need to > persist the StoreID of the folder as well? >