Hi there! I’m hoping there’s a RichText Item expert out there who can see what’s going wrong here.
I have a computed Rich Text field which is updated by the following code in the backend. Seems to work fine, but as the size of the field increases, at some point half the text (the top half) disappears. It’s as if the dup id 0, 1, and 2 disappear leaving dup id 3 behind. Can’t work out why. This is the code that is called to update the field:
Dim tempDate As New notesdatetime(cDate)
cDate = tempDate.ZoneTime
Dim comments As Variant, sess As New notessession, richStyle As NotesRichTextStyle
Set richStyle = sess.CreateRichTextStyle
Set comments = doc.GetFirstItem(“Comments”)
If comments.Type <> RICHTEXT Then Set comments = New NotesRichTextItem(doc,“Comments”)
richStyle.NotesFont = comments.GetNotesFont(“Default Sans Serif”,True)
richStyle.FontSize = 8
Call comments.AppendStyle(richStyle)
If comments.text <>“” Then Call comments.AddNewline(2)
Call comments.AppendText("Following added by " & cWho$ & " on " & cDate & “:”)
Call comments.AddNewline(1)
For dc = 1 To 160
Call comments.AppendText("-")
Next
Call comments.AddNewline(1)
Call comments.appendtext(cComm$)
The cComm string is collected from a subform simple text field and parsed in.
Any insight would be much appreciated!