Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim dc As NotesDocumentCollection Dim doc As NotesDocument Dim view As NotesView Dim key As String Set db = session.Currentdatabase Set view = db.GetView("vwAll") key = "L" Set dc = view.GetAllDocumentsByKey(key, False) Set doc = dc.GetFirstDocument() Print "製品 ID が [L] で始まるのは..." While Not(doc Is Nothing) Print "製品名: " + doc.ProductName(0) Set doc = dc.GetNextDocument(doc) Wend End Sub