LOTUSSCRIPT/COM/OLE CLASSES


Examples: StrikeThrough property
This example builds a rich text item and sets styles so that part of the text is bold and another part of the text is struck through.

Sub Initialize
 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 time changed")
 Dim richStyle As NotesRichTextStyle
 Set richStyle = session.CreateRichTextStyle
 Dim richText As New NotesRichTextItem(doc, "Body")
 Call richText.AppendText("The meeting is at ")
 richStyle.Bold = True
 Call richText.AppendStyle(richStyle)
 Call richText.AppendText("3:00")
 richStyle.Bold = False
 Call richText.AppendStyle(richStyle)
 Call richText.AppendText(" not ")
 richStyle.StrikeThrough = True
 Call richText.AppendStyle(richStyle)
 Call richText.AppendText("2:00")
 Call doc.Save(True, False)
End Sub

See Also