Enumeration
Accessing and Manipulating Data with ADSI provides several examples of enumeration. You can also enumerate the children of container objects. These children are objects themselves, rather than just properties on objects.
The following example uses the IADsContainer interface to enumerate the children of the container.
Dim Container as IADsContainer
Dim Child as IADs
Set Container = GetObject("LDAP://MyServer/DC=MyDomain,DC=Fabrikam,DC=com")
For Each Child in Container
Debug.Print Child.Name
Next Child
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for