Format a Users Name
Format a User s Name
Several properties are associated the NotesName class that enable you to return different versions of a user's Lotus Notes name. Several of the more common properties include the Common, Abbreviated and Canonical formats.
How It Works
Simply assign a value to an object and reference one of the property formats.
ImplementationExample 1
This first example displays the user's name in the common format (see Figure 13.16).
Dim s As NotesSession Dim person As NotesName Set s = New NotesSession Set person = New NotesName(s.UserName) Msgbox "This is the COMMON format: " & person.Common
Figure 13.16. Example of the Common user name format
ImplementationExample 2
This second example illustrates the user's name in the Abbreviated format (see Figure 13.17). This format as well as the Common format can be used to send emails.
Dim s As NotesSession Dim person As NotesName Set s = New NotesSession Set person = New NotesName(s.UserName) Msgbox "This is the ABBREVIATED format: " & person.Abbreviated
Figure 13.17. Example of the Abbreviated user name format
ImplementationExample 3
The third example shows the user's name in the Canonical format (see Figure 13.18).
Dim s As NotesSession Dim person As NotesName Set s = New NotesSession Set person = New NotesName(s.UserName) Msgbox "This is the CANONICAL format: " & person.Canonical
Figure 13.18. Example of the Canonical user name format