例: Items property (NotesDocument - LotusScript®)

  1. 次の例は文書内の各アイテムの名前を表示します。例えば、文書が 5 つのアイテムを含むとき、スクリプトは「From」、「SendTo」、「Subject」、「Body」、「DeliveredDate」のように表示します。
    Dim doc As NotesDocument
    '...set value of doc...
    Forall i In doc.Items
      Messagebox( i.Name )
    End Forall
  2. 次のスクリプトは文書の Authors アイテムを検索して、その値を authorItem オブジェクトに割り当てます。
    Dim doc As NotesDocument
    Dim authorItem As NotesItem
    '...set value of doc...
    Forall item In doc.Items
      If ( item.IsAuthors ) Then
        Set authorItem = item
      End If
    End Forall