例: IsSummary property

  1. 次のスクリプトは拡張クラス構文を使って Topic アイテムを新規作成します。この構文で作成されたアイテムの IsSummary にはデフォルトで True が設定されます。
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim doc As NotesDocument
    Dim item As NotesItem
    Set db = session.CurrentDatabase
    Set doc = New NotesDocument( db )
    doc.Topic = "I have something to say"
    Set item = doc.GetFirstItem( "Topic" )
    If item.IsSummary Then
      Messagebox _
      ( "Items created this way are automatically summmary." )
    End If
    Call doc.Save( False, True )
  2. 次のスクリプトは New を使って Topic アイテムを新規作成します。New で作成されたアイテムの IsSummary にはデフォルトで False が設定されます。Topic アイテムをビューに表示したいときは、IsSummary を True に設定します。
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim doc As NotesDocument
    Dim item As NotesItem
    Set db = session.CurrentDatabase
    Set doc = New NotesDocument( db )
    Set item = New NotesItem _
    ( doc, "Topic", "I have something to say" )
    item.IsSummary = True
    ' must specifically set this property
    Call doc.Save( False, True )