Examples: CreateDocument method

This script creates a new document in the current database, sets its Subject, and saves it. The document does not have a form associated with it; if a user opens the document in the user interface, Notes uses the default database form to display it.

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set doc = db.CreateDocument
doc.Subject = "New building"
Call doc.Save( True, True )