Examples: CreateName method
This example creates a NotesName object based on the current user name.
Dim session As New NotesSession
Dim userName As NotesName
Set userName = session.CreateName(session.UserName)
If userName.IsHierarchical Then
Messagebox userName.Canonical,, "Canonical name"
Messagebox userName.Abbreviated,, "Abbreviated name"
End If
Messagebox userName.Common,, "Common name"
If userName.Country <> "" Then
Messagebox userName.Country,, "Country"
End If
If userName.Organization <> "" Then
Messagebox userName.Organization,, "Organization"
End If
If userName.OrgUnit1 <> "" Then
Messagebox userName.OrgUnit1,, "OrgUnit1"
End If
If userName.OrgUnit2 <> "" Then
Messagebox userName.OrgUnit2,, "OrgUnit2"
End If
If userName.OrgUnit3 <> "" Then
Messagebox userName.OrgUnit3,, "OrgUnit3"
End If
If userName.OrgUnit4 <> "" Then
Messagebox userName.OrgUnit4,, "OrgUnit4"
End If
If userName.Given <> "" Then
Messagebox userName.Given,, "Given"
End If
If userName.Surname <> "" Then
Messagebox userName.Surname,, "Surname"
End If
If userName.Initials <> "" Then
Messagebox userName.Initials,, "Initials"
End If
If userName.Generation <> "" Then
Messagebox userName.Generation,, "Generation"
End If
If userName.ADMD <> "" Then
Messagebox userName.ADMD,, "ADMD"
End If
If userName.PRMD <> "" Then
Messagebox userName.PRMD,, "PRMD"
End If
If userName.Keyword <> "" Then
Messagebox userName.Keyword,, "Keyword"
End If