Read Outlook adress-book (exchange server5.5)

Does someone have a sample script, to read out the outlook adress book??

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Yes, I have.
My dumb provider does not let me upload it at the moment.
I'll try later, or write to
This code comes from, and I changed it to work with ASP.
You may use the VB code in, too, which contains several functions around the address book folder.
Also, I have an ASP project which adds a contact item that I may send to you.

Const strServer = "MyServer"
Const strMailbox = "MyMailbox"

strProfileInfo = strServer & vbLf & strMailbox

Set objSession = CreateObject("MAPI.Session")

objSession.Logon , , False, False, , True, strProfileInfo

Set objAddrEntries = objSession.AddressLists _
                 ("Global Address List").AddressEntries
Set objFilter = objAddrEntries.Filter
objFilter.Fields.Add CdoPR_SURNAME, "LastName"
objFilter.Fields.Add CdoPR_GIVEN_NAME, "FirstName"

On Error Resume Next

For Each objAddressEntry In objAddrEntries
      Response.Write objAddressEntry.Name
      Response.Write "E-address: " & objAddressEntry.Address
      Response.Write "Given Name: " & _
      Response.Write "Initials: " & objAddressEntry.Fields _
      Response.Write "Surname: " & objAddressEntry.Fields _
      Response.Write "Display Name: " & objAddressEntry.Fields _
      Response.Write "Alias: " & _
      Response.Write "Title: " & _
      Response.Write "Company Name: " & objAddressEntry.Fields _
      Response.Write "Office Location: " & objAddressEntry.Fields _
      Response.Write "Office Phone 1: " &  objAddressEntry.Fields _
      Response.Write "Office Phone 2: " & objAddressEntry.Fields _
      Response.Write "Business Fax: " & objAddressEntry.Fields _
      Response.Write "Mobile Phone: " & objAddressEntry.Fields _
      Response.Write "Pager: " & objAddressEntry.Fields _
      Response.Write "Assistant: " & objAddressEntry.Fields _
      Response.Write "Assistant Phone: " & objAddressEntry.Fields _
      Response.Write "Home Phone 1: " & objAddressEntry.Fields _
      Response.Write "Home Phone 2: " & objAddressEntry.Fields _
      Response.Write "Home Fax: " & objAddressEntry.Fields _
      Response.Write "Home Street: " & objAddressEntry.Fields _
      Response.Write "Home City: " & objAddressEntry.Fields _
      Response.Write "Home State: " & objAddressEntry.Fields _
      Response.Write "Home Postal Code: " & objAddressEntry.Fields _
      Response.Write "Home Country: " & objAddressEntry.Fields _
      Response.Write "Manager Name: " & objAddressEntry.Fields _
      Response.Write "Manager Name: " & objAddressEntry.Manager


Set objFilter = Nothing
Set objAddrEntries = Nothing
Set objSession = Nothing

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

Set objSession = CreateObject("MAPI.Session")

should be;

Set objSession = Server.CreateObject("MAPI.Session")
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.