Examples: Send method

  1. This script mails a document and its form. The document is mailed to the recipients contained in the SendTo item of the document.
    Dim doc as NotesDocument
    '...set value of doc...
    Call doc.Send( True )
  2. This script sets the value of the SendTo item in a document. It then mails the document and its form. The document gets mailed to Carl Pycha.
    Call doc.ReplaceItemValue( "SendTo", "Carl Pycha" )
    Call doc.Save( False, True )
    Call doc.Send( True )
  3. This script mails a document to Sally Bowles. The form is not mailed.
    Call doc.Send( False, "Sally Bowles" )
  4. This script mails a document and its form to Jim Dinauer, Betty Dinauer, and Mary Sticka.
    Dim recipients( 1 To 3 ) As String
    recipients( 1 ) = "Jim Dinauer"
    recipients( 2 ) = "Betty Dinauer"
    recipients( 3 ) = "Mary Sticka"
    Call doc.Send( True, recipients )
  5. This script mails a document to anyone listed in its DocAuthor field.
    Call doc.Send( True, doc.DocAuthor )
  6. This script creates a new document in the current database and mails it to Elissa Minty.
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim doc As NotesDocument
    Set db = session.CurrentDatabase
    Set doc = New NotesDocument( db )
    doc.Form = "Memo"
    doc.SendTo = "Elissa Minty"
    doc.Subject = "Here's the document you wanted"
    Call doc.Send( False )