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)
End If
This was first published in March 2001