|Become a Columnist Microsoft Exchange Site Microsoft Support SiteMSDN Exchange Site|
If you want your app to point to a specific contact list you need to use one of the following:
ns.GetDefaultFolder olFolderContacts ' will get your default contact folder
ns.GetSharedDefaultFolder x, olFolderContacts ' will get someone elses default contact folder, assume they are sharing it
ns.GetFolderFromID EntryID, StoreID ' assuming you have entryid & storeid saved will get a specific folder, you would normally have a lookup routine go out & find these, with either a select dialog box, or matching on name, then save the info from the found items...
' Use a loop like below to find a folder with a specific name, description, or MessageClass, once found you could save the entryid & storeid for later use
Attached is a couple of Word VBA functions that will walk the MAPI folder tree in Outlook. What you find is off of the NameSpace object you will have your information stores, I have two, the 'Microsoft Mail' shared folders, and my 'Personal Information Store', then under each information store (or message store) you will have your folders, then under those folders, you may have more folders...
Sub ListFolder(parent As Folders,
depth As Integer)
Here is what my MAPI folder tree looks like, NOTE this does not include
Jay B. Harlow
Microsoft Mail Shared Folders
Hope this helps
Disclaimer: Your use of the information contained in these pages is at your sole risk. All information on these pages is provided "as is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Stephen Bryant or Pro Exchange. OutlookExchange.Com, Stephen Bryant and Pro Exchange shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.
Copyright Stephen Bryant 2008