LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA to get MS Outlook Contacts Records

I am using Office XP within XP Pro environment. I have 3 users each o
whom have their personal Outllook Contacts database.

I have manually exported each of these into a single Excel workbook.
have de-duplicated the entries and ensured the correctness of eac
entry and enforced a common formatting of data.

I wish to automate a procedure of:
1. Opening each contacts database
2. Downloading into Excel all contact details
3. De-duplicating and manipulating the records into a composite lis
- this code already written
4. Upload this composite list to overwrite the existing contact
database for each user.

I have used the code below to get a name and e-mail address fro
Outlook but am having real problems changing this to get all th
Contacts records.

Dim objO As Outlook.Application
Dim objAL As Outlook.AddressList
Dim objAE As Outlook.AddressEntry
Dim strAdd() As String
Dim i As Integer

Set objO = CreateObject("Outlook.Application")
Set objAL = objO.Session.AddressLists("Contacts")

For Each objAE In objAL.AddressEntries
i = i + 1
ReDim Preserve strAdd(1 To 2, i)
strAdd(1, i) = objAE.Name
strAdd(2, i) = objAE.Address
Next objAE

Set objO = Nothing

I have seen a MAPI way of doing this but I cannot get it to work on m
system.

Can anyone help please?[I

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Contacts from Excel to Outlook Ergg Excel Discussion (Misc queries) 1 January 20th 10 10:12 PM
How do I export contacts from Excel back to Outlook Contacts? corvettego Excel Discussion (Misc queries) 2 August 17th 09 06:29 PM
export from 07 excel to outlook contacts Bluedee Excel Worksheet Functions 0 September 18th 08 04:36 PM
Selected Outlook contacts to excel landshark Excel Discussion (Misc queries) 1 April 17th 07 09:30 PM
Outlook and Excel Integration for Contacts Shauna Koppang Excel Programming 14 August 22nd 03 11:32 PM


All times are GMT +1. The time now is 10:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"