Examples: Document property (NotesOutlineEntry - LotusScript)

This code loops through the entries in an outline and displays the note ID of the documents retrieved by any entries that are set to link to a document one at a time.

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