outlook folders

S

Sue Mosher [MVP-Outlook]

To get the store IDs, just iterate the Namespace.Folders collection:

Set objOL = CreateObject("Outlook.Application")
Set objNS = objOL.GetNamespace("MAPI")
For Each objFolder in objNS.Folders
strStoreID = objFolder.StoreID
MsgBox strStoreID
Next
 
V

Vijay

Hi
If there are 5 pst files which can open in outlook. then registry
contains information for all these 5 pst files.The following statement will
execute 5 times for each pst file's top level folder.
For Each objFolder in objNS.Folders
If any pst file is accidently delete in system, then following statement
gives error.
strStoreID = objFolder.StoreID
because its entry exist in registry but file is deleted.
So how to solve this problem.
 
S

Sue Mosher [MVP-Outlook]

You'll need to handle the error. If the file has been deleted, then no store
is available and thus no StoreID.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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