例: IsValid property (NotesDocument - LotusScript®)

次の例は文書を取り出し、その文書が有効かどうかを調べます。

Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entry As NotesviewEntry
Dim vc As NotesViewEntryCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set vc = view.GetAllEntriesByKey("Cars")
Set entry = vc.GetFirstEntry()
Set doc = entry.document
If doc.IsValid = True Then
  Messagebox "This document is valid."
Else
  Messagebox "This document is not valid."
End If