|
-
July 2nd, 2001, 07:20 AM
#1
Outlook97 Addressbook
Help please,
I am trying to read the outlook 97 address book into a combo box with the following code but it gives an error.
Object does not support this property or method
Dim myOlApp As Object
Dim myNameSpace As Object
Dim myAddressList As Object
Dim myAddressEntries As Object
Dim i As Integer
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myAddressList = myNameSpace.AddressLists("Contacts")
Set myAddressEntries = myAddressList.AddressEntries
With cboFaxNumbers
.AddItem myAddressEntries.GetFirst
For i = 2 To myAddressEntries.Count
.AddItem myAddressEntries.GetNext
Next i
End With
Help appreciated
Cheers
Rob
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
|