Using LS to create a section

Hi. I’m relatively new to lotusscript, and trying to do the following:

I have a field called “newcom”, in which users type comments, then click a “save comments” button that copies the comments into an uneditable field called “history”, so that once they click the button, the comments are there to stay.

I would like it to copy the comments in as a section, with a new section created for each comment added. So, in the button code, I dim rti as NotesRichTextItem, and use the following code:

Call rti.BeginSection(“New Comments”)

Call rti.AppendText(uidoc.FieldGetText(“newcom”))

Call rti.EndSection

Now, I want to put that section into the “history” field, and I can’t figure out how to do that. The history field is a Rich Text field.

Can anyone help?

Thanks!

Subject: Using LS to create a section

It’s not the section that’s the problem – you need “History” to be “rti”:

Dim rti As NotesRichTextItem

Set rti = doc.GetFirstItem(“History”)