C
Colin S.
The code at the bottom is able to pull information back from the AD
about the current user. I need more, but dont know what else I can
request. Is there a way I can list the properties available to me?
I've tried adding this:
For Each Item In objUser
Debug.Print objUser.Item
Next
But the macro skipped right over it. Any idea?
Thanks,
Colin
Sub GetADinfo()
Dim objSysinfo As Object
Dim objUser As Object
Dim strUser As String 'Distinguished Name
Set objSysinfo = CreateObject("ADSystemInfo")
strUser = objSysinfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
debug.print objUser.get("Title")
debug.print objUser.get("department")
debug.print objUser.get("telephonenumber")
debug.print LCase(objUser.get("mail"))
End Sub
about the current user. I need more, but dont know what else I can
request. Is there a way I can list the properties available to me?
I've tried adding this:
For Each Item In objUser
Debug.Print objUser.Item
Next
But the macro skipped right over it. Any idea?
Thanks,
Colin
Sub GetADinfo()
Dim objSysinfo As Object
Dim objUser As Object
Dim strUser As String 'Distinguished Name
Set objSysinfo = CreateObject("ADSystemInfo")
strUser = objSysinfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
debug.print objUser.get("Title")
debug.print objUser.get("department")
debug.print objUser.get("telephonenumber")
debug.print LCase(objUser.get("mail"))
End Sub