CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2000
    Location
    Canada
    Posts
    29

    Address (contact list) in windows 2000

    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



  2. #2
    Join Date
    Sep 2000
    Posts
    8

    Re: Address (contact list) in windows 2000

    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


  3. #3
    Join Date
    Jun 2001
    Location
    London, Ontario, Canada
    Posts
    20

    Re: Address (contact list) in windows 2000

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured