Accessing Distribution List members using CDO

I

ian_journeaux

I have a name to a distribution list and I want to access the names in
the list. Is the only way to accomplish this to cycle through the GAL
one at a time until we get a match?

In out situation the Distribution list name is near the end of the GAL.
Given our exchange configuration this loop can take 10 minutes

Here is the code I am using. Basically I am stepping though the GAl one
item at a time until I find the correct entry then I cna access the
distribution list members.

Dim M, thislist, oSelUser, oColl, gal
oSelUser = oAddrEntry.Address
Set gal = EventSession.GetAddressList(CdoAddressListGAL)
Set oColl = gal.AddressEntries
Set M = oColl.GetFirst
Set thislist = Nothing
Do While Not (M Is Nothing) And thislist Is Nothing
If M.name = thislistname Then
Set thislist = M
End If
Set M = oColl.GetNext
Loop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top