If you used the AddStore method then the new store will be one of the top
level members of the NameSpace.Folders collection. You can get a count of
those folders before you add the store and then the newest one will have an
index 1 higher than the previous last folder.
Not necessarily - I had problems with this approach. A more robust solution
would be to enumerate all top level folders (Namespace.Folders) storing
their StoreID property, call AddStore, loop through Namespace.Folders
again - a folder with StoreID not in the original collection is the new PST
store.
Really makes you think how one minor OOM design flaw can become a
potentially big problem - things would've been much easier if AddStore
simply returned the new top level folder...
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.