次の Visual Basic コードは NotesName オブジェクトの親ユーザー名を表示します。
Private Sub NotesName_Click()
Dim session As New NotesSession
Dim nam As NotesName
Call session.Initialize
Set nam = session.CreateName( _
"CN=John B Goode/OU=Sales/OU=East/O=Acme/C=US")
Call Display_Names(nam)
End Sub
Private Sub Display_Names(n As NotesName)
MsgBox n.Common,, "Received name"
MsgBox n.Parent.CommonUserName,, "Current user name"
End Sub