|
-
Aug 13th, 2002, 04:37 PM
#1
Thread Starter
Junior Member
Extracting Contact info in Outlook 2K
Hi
I'm trying to extract the following contacts info from Outlook 2000
Contact's:
Name
Phone Number
House Address
I can get the contact's name and email with the following code but that is all. I am unsure how to use the Outllok object model so any advice/ examples would be gratefully appreciated
Cheers Norm RC
Private Sub Form_Load()
Dim moMail As Object
Dim loNameSpace As Object
Dim loNameAddresses As Object
Dim loAddresses As Object
Dim loAddressList As Object
Dim intcre As Integer
Dim moAddresses As Outlook.AddressLists
Set moMail = New Outlook.Application
Set loAddressList = loAddresses.AddressEntries
Set loNameSpace = moMail.GetNamespace("MAPI")
Set loAddresses = loNameSpace.AddressLists("Contacts")
With List1
.Clear
For i = 1 To loAddressList.Count
'load the contact info into listbox "List1"
.AddItem loAddressList.Item(i).Name
.AddItem loAddressList.Item(i).Address
Next i
End With
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|