Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read from Outlook Address Book

VB Programming Concepts

Read from Outlook Address Book

by  wizpooter  Posted    (Edited  )
I've seen around alot of forum and needing help on how to retrieve address book for VB project, I've put together piece by piece and viola it works, only need "Microsoft Outlook xx.x Object Library - I used 10.0)

[color green]'create an listbox (i named it ab - Address Book)[/color]
[color blue]Option Explicit
Dim ola As Outlook.AddressList
Dim ole As Outlook.AddressEntry

Private Sub address_book_Click()
On Error Resume Next
Set ola = Application.Session.AddressLists("Contacts")[/color] [color green]'Contact is the name of your address book[/color]
[color blue]For Each ole In ola.AddressEntries
ab.AddItem ole
Next
Set ola = Nothing
Set ole = Nothing
End Sub[/color]

[thumbsup2]Sean
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top