Hi All
I am trying to retrieve the AD attributes for a particular username so I can generate an email for that user after pulling their address.
However I have found that not all users have the same OU as me, so I need to exract by user and use the ou as a parm in the email retrieval.
Set sysInfo = CreateObject("ADSystemInfo")
Debug.Print sysInfo.UserName
On Error Resume Next
Set oUser = GetObject("LDAP://CN=" & ownername & ",OU=Users,OU=????? Brisbane,DC=ch4,DC=com,DC=au")
Debug.Print oUser.EmailAddress
I need to extract the bold part first.
Any ideas?
Thanks
Sean
Bookmarks