例: Domino ニュースレターを作成する

次のエージェントは、現在のデータベースのすべての文書への文書リンクで構成されたニュースレターを作成し、Marketing グループにこのニュースレターをメール送信します。

Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Dim dc As NotesDocumentCollection
  Dim news As NotesNewsletter
  Dim doc As NotesDocument
  Set db = session.CurrentDatabase
  Call db.UpdateFTIndex(True)
  Set dc = db.FTSearch("Acme", 0)
  Set news = New NotesNewsletter(dc)
  news.SubjectItemName = "Subject"
  news.DoSubject = True
  Set doc = news.FormatMsgWithDoclinks(db)
  Call doc.Send(True, "Marketing")
End Sub