例: Document property (NotesOutlineEntry - LotusScript)

次のコードはアウトライン内のエントリをループして、文書リンクがあるエントリにより取得された文書の文書 ID を一度に 1 つずつ表示します。

Sub Initialize
  Dim session as New NotesSession
  Dim db As NotesDatabase
  Dim outline As NotesOutline
  Dim oe As NotesOutlineEntry
  Dim doc As NotesDocument
  Dim count As Integer
  Set db = session.CurrentDatabase
  Set outline = db.GetOutline("myOutline")
  Set oe = outline.GetLast
  While Not (oe Is Nothing)
    If oe.EntryClass = OUTLINE_CLASS_DOCUMENT Then
      Set doc = oe.Document
      Messagebox oe.Label & " entry links to note ID: " _
       & Chr(13) & doc.NoteID,, "Document link"
      count% = count% + 1
    End If
    Set oe = outline.GetNext(oe)
  Wend
  If count% < 1 Then
    Messagebox "None of the outline entries are document _
    links",, "No document links"
  End If 
End Sub