Search the directory and retrieve Entries.
Search(Base As String, Filter As String, [ Scope As
axldapScope = axldapScopeSubTree ], [ AttributeNames As Variant = Nothing ], [ Timeout As Long = 0 ], [ IgnoreSizeLimitError As Boolean = False ]) As
LDAPEntryCollection' Find first names of all the Smiths.
Set pLDAP = CreateObject("LDAPClient.3")
Call pLDAP.Connect("ldapserver")
Set pAttributeNames = CreateObject("LDAPClient.StringCollection")
Call pAttributeNames.Add("givenName")
' Find all the Johns and all the Smiths
Set pEntries = pLDAP.Search("o=airius.com", "(|(givenName=John)(sn=Smith))", , pAttributeNames)
For Each pEntry In pEntries
MsgBox pEntry.Attributes("givenName").Values(0).Value
Next