Sub Initialize Dim session As New NotesSession Dim db As NotesDatabase Dim doc As NotesDocument Dim view As NotesView Dim key As String Set db = session.Currentdatabase Set view = db.GetView("vwAll") key = "L01" Set doc = view.GetDocumentByKey(key, True) If Not(doc Is Nothing) Then Print "製品 ID [" + key + "] の製品名は、[" + doc.ProductName(0) + "] です。" Else Print "一致する文書が見つかりませんでした。" End If End Sub