I dont know if is possible...
Hans, please take a eyes here!
I know the username s.a. OU1234556 and domain name MYDOMAIN is possibleb to have the complete name of username similar Jhon Smith?
Please with vb6 or vba for excel
complte username about domain and usename
-
- PlatinumLounger
- Posts: 4346
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 78402
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: complte username about domain and usename
I'm sure it's possible, but I have no idea how to do that.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 7208
- Joined: 15 Jan 2010, 22:52
- Location: Middle of England
-
- Administrator
- Posts: 78402
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: complte username about domain and usename
Leif, the code posted there will return the Windows login name, "OU1234556" in Sal21's example.
On a domain, the full name of the user ("Jhon Smith") may be available in Active Directory (AD). I interpreted Sal's question to be how to extract the full name from AD if you know the login name.
I found some old code that says it's for Windows NT and 2000; I suppose it'll work for Windows XP too, but I have no idea whether it'll work in Windows Vista or Windows 7 on a domain. (On my home PC, it returns an empty string).
I have attached the code, for what it's worth. It should be copied into a module.
On a domain, the full name of the user ("Jhon Smith") may be available in Active Directory (AD). I interpreted Sal's question to be how to extract the full name from AD if you know the login name.
I found some old code that says it's for Windows NT and 2000; I suppose it'll work for Windows XP too, but I have no idea whether it'll work in Windows Vista or Windows 7 on a domain. (On my home PC, it returns an empty string).
I have attached the code, for what it's worth. It should be copied into a module.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4346
- Joined: 26 Apr 2010, 17:36
Re: complte username about domain and usename
l.HansV wrote:Leif, the code posted there will return the Windows login name, "OU1234556" in Sal21's example.
On a domain, the full name of the user ("Jhon Smith") may be available in Active Directory (AD). I interpreted Sal's question to be how to extract the full name from AD if you know the login name.
I found some old code that says it's for Windows NT and 2000; I suppose it'll work for Windows XP too, but I have no idea whether it'll work in Windows Vista or Windows 7 on a domain. (On my home PC, it returns an empty string).
I have attached the code, for what it's worth. It should be copied into a module.
Sure Hans this is exactlly wath i need!!!!!!!!!!!!!!!!
Only you!
Sa
-
- Administrator
- Posts: 12601
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: complte username about domain and usename
It worked correctly for me, using a Windows Vista PC logged into my work domain via a VPN connection.HansV wrote:...I have no idea whether it'll work in Windows Vista or Windows 7 on a domain...
StuartR
-
- Administrator
- Posts: 78402
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: complte username about domain and usename
Thanks for the confirmation, Stuart!
Best wishes,
Hans
Hans