'CreateDoc: Option Public Option Declare Public Class MyDocument Private m_session As NotesSession Private m_db As NotesDatabase Private m_doc As NotesDocument Public Sub New Set m_session = New NotesSession Set m_db = m_session.CurrentDatabase End Sub Public Sub Delete If Not(m_doc Is Nothing) Then Call Me.Close End Sub Public Function Create As Boolean Set m_doc = New NotesDocument(m_db) If m_doc Is Nothing Then Create = False Else Create = True m_doc.Form = "Doc" End If End Function Public Property Set Body As String m_doc.Body = Body End Property Public Property Get Body As String Body = m_doc.Body(0) End Property Public Function Close As Boolean Me.Close = m_doc.Save(True, False) Set m_doc = Nothing End Function End Class Sub Initialize Dim s As New NotesSession Dim doc As New MyDocument 'Create the document and generate an error if there is a problem If Not(doc.Create) Then Messagebox "Could not create the document." Exit Sub End If 'Save some text to the document doc.Body = "I'm too sexy for this body." Messagebox doc.Body 'Close the document and report the result If doc.Close Then Messagebox "Document saved and closed successfully." Else Messagebox "Could not successfully close the document." End If End Sub