次のエージェントは階層名と階層なしの名前を作成し、それぞれをテストします。
Sub Initialize
Dim session As New NotesSession
Dim nam As NotesName
REM Create a hierarchical name
Set nam = session.CreateName( _
"John B Goode/Sales/East/Acme/US")
REM Returns "Hierarchical name"
Call TestName(nam)
REM Create a flat name
Set nam = session.CreateName( _
"John B Goode")
REM Returns "Flat name"
Call TestName(nam)
End Sub
Sub TestName(nam)
If nam.IsHierarchical Then
Messagebox nam.Abbreviated,, "Hierarchical name"
Else
Messagebox nam.Common,, "Flat name"
End If
End Sub