例: AddNewLine method

次のスクリプトは、文書内で ProjectDescription アイテムを検索します。そして、アイテムに改行とテキストを追加します。

Dim doc As NotesDocument
Dim rtitem As Variant
'...set value of doc...
Set rtitem = doc.GetFirstItem( "ProjectDescription" )
If rtitem.Type = RICHTEXT Then
  Call rtitem.AddNewLine( 1 )
  Call rtitem.AppendText( "Book is 64 pages, full color." )
End If
Call doc.Save( False, True )

ProjectDescription アイテムがテキスト値「Cartoon book for children ages 9-12」を含んでいた場合、そのテキスト値は次のように変更されます。

Cartoon book for children ages 9-12

Book is 64 pages, full color.