LOTUSSCRIPT/COM/OLE CLASSES
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", Inputbox("Subject?")) Call doc.AppendItemValue _ ("Categories", Inputbox("Category?")) Dim richStyle As NotesRichTextStyle Set richStyle = session.CreateRichTextStyle richStyle.NotesFont = FONT_COURIER richStyle.FontSize = 14 Dim richText As New NotesRichTextItem(doc, "Body") Call richText.AppendStyle(richStyle) newPara = Inputbox _ ("Paragraph of text for ""Body"" item") firstPara = True While newPara <> "" If firstPara Then firstPara = False Else Call richText.AddNewLine(2) End If Call richText.AppendText(newPara) newPara = Inputbox _ ("Paragraph of text for ""Body"" item") Wend Call doc.Save(True, False) End Sub
See Also