Code will take the user name and separate the First Name, Last Name and Middle Initial to be used for searching the Address book or other views.
user_name = Evaluate("@Name([CN];@UserName)")
len_all_name = Len(user_name(0))
pos_first_name = Instr(user_name(0)," ")
first_name = Left(user_name(0),pos_first_name - 1)
last_name = Right(user_name(0),len_all_name - pos_first_name)
pos_middle = Instr(last_name," ")
If pos_middle <> 0 Then
mid_name = Left(last_name,pos_middle -1)
first_name = first_name & " " & mid_name
pos_all_last = Len(last_name)
last_name = Right(last_name,pos_all_last - pos_middle)
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.