例: CreateEntry method

  1. 次の例は、エントリを新規作成し、空のアウトラインに追加します。
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim outline As NotesOutline
    Dim entry As NotesOutlineEntry
    Set db = session.CurrentDatabase
    'Gets the outline called emptyoutline
    Set outline = db.GetOutline("emptyoutline")
    'Creates a new outline entry called MyFirstEntry 
    'and adds it to the outline
    Set entry = outline.Createentry("MyFirstEntry")
    'Saves the outline with its new entry
    Call outline.save()
  2. 次の例は、アウトラインエントリを新規作成し、「myoutline」アウトラインの最初のエントリの子エントリとして追加します。
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim outline As NotesOutline
    Dim entryA As NotesOutlineEntry
    Dim entryB As NotesOutlineEntry
    Set db = session.CurrentDatabase
    Set outline = db.GetOutline("myoutline")
    Set entryA = outline.GetFirst()
    Set entryB = outline.Createentry("MyEntry",entryA,1,1)
    Call outline.save()
  3. 次の例はアウトラインエントリを新規作成し、アウトラインの最初のエントリとして追加します。
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim outline As NotesOutline
    Dim entryA As NotesOutlineEntry
    Dim entryB As NotesOutlineEntry
    Set db = session.CurrentDatabase
    Set outline = db.GetOutline("discussion")
    Set entryA = outline.GetFirst()
    Set entryB = outline.Createentry("MyEntry",entryA)
    Call outline.save()
  4. 次の例はアウトラインエントリを新規作成し、アウトラインの最上位レベルにある最初のエントリの後ろに追加します。
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim outline As NotesOutline
    Dim entryA As NotesOutlineEntry
    Dim entryB As NotesOutlineEntry
    Set db = session.CurrentDatabase
    Set outline = db.GetOutline("myoutline")
    Set entryA = outline.GetFirst()
    Set entryB = outline.Createentry("MyEntry",entryA,1)
    Call outline.save()