Hello Everyone
My saga continues with the Active Directory. With help from earlier postings and experimentation of code I am able to accomplish what I want but it is terribly slow. Should I be searching the Active Directory differently than just cycling through the Active Directory with this code.
'-------------------------------------------
Dim strDomin, strLine, objProvNt
strDomain = "(myDomain)"
Set objProvNt = GetObject("WinNt://" & strDomain)
objProvNt.Filter = Array("User"
For Each strLine In objProvNt
MsgBox strLine
Next
'--------------------------------------------
In the completed program I prompt the user for a name to search for so other than the code used to manipluate the name field the above code is what is used to perform the search on the Active Directory. Posed with the original question are 2 more parts that are related. 1) Is there a way to search a specific OU within my domain. An example of this is here are only two examples out of a page fill of OU's (usmiflt) and (usmikok) both of these OU's reside in my domain.
2) After I get the results from my search the name field
example of this field is (Lastname, FirstName MiddleIntil)
is there away to get the users username, our username is totally different from our full name. Here is an exapmle (gzw9ty) is the user name (Doe, John R) is the full name there are no parenthesis.
My saga continues with the Active Directory. With help from earlier postings and experimentation of code I am able to accomplish what I want but it is terribly slow. Should I be searching the Active Directory differently than just cycling through the Active Directory with this code.
'-------------------------------------------
Dim strDomin, strLine, objProvNt
strDomain = "(myDomain)"
Set objProvNt = GetObject("WinNt://" & strDomain)
objProvNt.Filter = Array("User"
For Each strLine In objProvNt
MsgBox strLine
Next
'--------------------------------------------
In the completed program I prompt the user for a name to search for so other than the code used to manipluate the name field the above code is what is used to perform the search on the Active Directory. Posed with the original question are 2 more parts that are related. 1) Is there a way to search a specific OU within my domain. An example of this is here are only two examples out of a page fill of OU's (usmiflt) and (usmikok) both of these OU's reside in my domain.
2) After I get the results from my search the name field
example of this field is (Lastname, FirstName MiddleIntil)
is there away to get the users username, our username is totally different from our full name. Here is an exapmle (gzw9ty) is the user name (Doe, John R) is the full name there are no parenthesis.