例: FindFirstMatch method

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

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
	Dim items( 1 To 2) As String
	items(1) = "FullName"
	items(2) = "InternetAddress"
	Set nav = directory.LookupAllNames("My Contacts", items)
	If nav.CurrentMatches > 0 Then
		nav.FindFirstMatch 'not really needed
		Do
			value = nav.GetFirstItemValue
			msg = msg & Cstr(value(0)) & | |
			value = nav.GetNextItemValue
			msg = msg & Cstr(value(0)) & |
|
		Loop While nav.FindNextMatch
	End If
	Msgbox msg,, "My Contacts"
End Sub