Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XP, Outlook, profiles

Status
Not open for further replies.

BADSBRD

IS-IT--Management
Dec 26, 2003
34
US
I need some help. I'm trying to develope an image for our new XP Pro machines. These machines all will have Outlook on them, but will be accessed by many different users. Too many to setup their Outlook accounts manually.

I found some software that will help with this, but there is one problem. Our domain usernames are numerical, don't ask me why. Is there any other way to get their names into Outlook, other than the %username% variable?

I've noticed that XP puts my full name in the start menu, even though I sign in with the numerical login....how does XP grab that?????

Thanks,

Rick
 
You can use a windows API to obtain the information:

. VB example

. WSH

'Get the users Full Name from SAM and extract Last Name and First Name
'We assume that everything to the left of the last name is the first name
'======================
On Error Resume Next
'
Set objNetwork=Wscript.CreateObject("WScript.Network")
Set WSHShell = WScript.CreateObject("regtool.tob")

strDomain=objNetwork.UserDomain
strUser=objNetwork.UserName
strADSPath="WinNT://"& strDomain & "/" & strUser
Set objADS=GetObject(strADSPath)
strFullName=objADS.FullName
intFullNameLength=Len(strFullName)
'
For n=intFullNameLength to 1 step -1
If Mid(strFullName,n,1) = " " Then
strLastName=Mid(strFullName,n+1,intFullNameLength-n)
strFirstName=Mid(strFullName,1,n)
n=1
End If
Next
'
 
I'm not a very good VB person. I've only done a VB project once, and that was 4 years ago. Can I reference a VB variable from Outlook, or an Outlook profile?

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top