C
Clarke
Hello all,
I am trying to add the names of contacts and distribution lists in my
contact folder to a Word list box. My problem is that I don't know how to
test to see whether or not something is a distribution list. Something like
this should work, if someone can help me figure out what the names of the
properties are:
NumItems = currItems.Count
For X = 1 To NumItems
If ??currItems.Item(X) is a contact?? Then
lstContacts.AddItem currItems.Item(X).FileAs
Else 'this is a distribution list, not a contact
lstContacts.AddItem currItems.Item(X).DLName
End If
Next
For some reason this code works will work on contacts and on the first
distribution list, but not on the second list:
Dim NumItems As Integer
NumItems = currItems.Count
For X = 1 To NumItems
On Error GoTo DList
lstContacts.AddItem currItems.Item(X).FileAs
GoTo Finished
DList: lstContacts.AddItem currItems.Item(X).DLName
'this is a distribution list, not a contact
Finished:
Next
Thanks for any help.
I am trying to add the names of contacts and distribution lists in my
contact folder to a Word list box. My problem is that I don't know how to
test to see whether or not something is a distribution list. Something like
this should work, if someone can help me figure out what the names of the
properties are:
NumItems = currItems.Count
For X = 1 To NumItems
If ??currItems.Item(X) is a contact?? Then
lstContacts.AddItem currItems.Item(X).FileAs
Else 'this is a distribution list, not a contact
lstContacts.AddItem currItems.Item(X).DLName
End If
Next
For some reason this code works will work on contacts and on the first
distribution list, but not on the second list:
Dim NumItems As Integer
NumItems = currItems.Count
For X = 1 To NumItems
On Error GoTo DList
lstContacts.AddItem currItems.Item(X).FileAs
GoTo Finished
DList: lstContacts.AddItem currItems.Item(X).DLName
'this is a distribution list, not a contact
Finished:
Next
Thanks for any help.