例: CurrentMatches property

このボタンにより、ローカルディレクトリ内の個人アドレス帳の [連絡先] ビューにアクセスして、各文書の [FullName] アイテムの値を返します。

Dim session As NotesSession
Dim directory As NotesDirectory
Sub Initialize
	Set session = New NotesSession
	Set directory = session.GetDirectory("")
End Sub

Sub Click(Source As Button)
	Dim nav As NotesDirectoryNavigator
	Dim msg As String
	Dim value As Variant
	Set nav = directory.LookupAllNames("My Contacts", "FullName")
	For i = 1 To nav.CurrentMatches
		nav.FindNthMatch(i)
		value = nav.GetFirstItemValue
		msg = msg & Cstr(value(0)) & |
|
	Next
	Msgbox msg,, "My Contacts"
End Sub