Examples: SetAction method

This example adds a new entry called "Contacting us" under the "Home" parent entry which is the first entry in the "Web site" outline and sets the new entry to open the "Comments" form in edit mode when clicked.

Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Dim outline As NotesOutline
  Dim oe As NotesOutlineEntry
  Dim existingOE As NotesOutlineEntry
  Set db = session.CurrentDatabase
  Set outline = db.GetOutline("Web site")
  Set existingOE = outline.GetFirst
  Set oe = outline.CreateEntry("Contacting us", _
  existingOE, True, True)
  Call oe.SetAction({@Command([Compose];"Comments")})
  Call outline.AddEntry(oe)
  Call outline.Save()
End Sub