Click to See Complete Forum and Search --> : Address (contact list) in windows 2000


Jean-Guy
August 11th, 2000, 09:15 AM
I heard that there was a centreal directory for windows 2000 for storing contact lists. I am assuming Outlook2000 is using this for it's contact list. I was wondering what the contract list is called and how to access it from VB. I am writing a application that uses a contact list. Right now I am storing the contacts in a access database but this requires the user to export from outlook and import to the dbase. I want to bypass this and read/write to the outlook 2000 contact list. If this feature is only avail in Win2000 then thats ok too. Since this is a NT only app.

Thanks
Jean-Guy

avisiyer
September 27th, 2000, 05:59 AM
You can retreive the contact list from outlook 2000 from vb using this code

Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
' u can use contacts or personnel address book to retrieve it
Set myAddressList = myNameSpace.AddressLists("Contacts")
Set myAddressEntries = myAddressList.AddressEntries

List1.AddItem myAddressEntries.GetFirst

For i = 2 To myAddressEntries.Count

List1.AddItem myAddressEntries.GetNext
Next

Bonovox011
June 12th, 2001, 08:41 AM
I have tried the above code and am struggling to make it work, I am trying to access contacts from a public folder, Am I missing a library or some other reference?? Please Help.

Ciao for Now,

Bonovox011