次のスクリプトは、新しいリッチテキストアイテムを作成して段落スタイルを追加します。
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim doc As New NotesDocument(db)
Call doc.AppendItemValue("From", session.Username)
Call doc.AppendItemValue("Subject", _
"Meeting agenda")
Dim rtpStyle As NotesRichTextParagraphStyle
Set rtpStyle = session.CreateRichTextParagraphStyle
Dim richText As New NotesRichTextItem(doc, "Body")
rtpStyle.FirstLineLeftMargin = RULER_ONE_INCH
Call richText.AppendText("Where are we now?")
Call richText.AppendParagraphStyle(rtpStyle)
Messagebox "First line, left margin: " & rtpStyle.FirstLineLeftMargin
Call doc.Save(True, False)