NotesRichTextItem

Hi All .

How to clear value of richtextitem and set again with new value ?

Subject: NotesRichTextItem

Sub Click(Source As Button) Dim session As New notessession

Dim ws As New notesuiworkspace

Dim RtItem As Notesrichtextitem

Dim uidoc As notesuidocument

Dim doc As notesdocument

Dim empname As Variant

Dim age As Variant

Set uidoc=ws.currentdocument

Set doc=uidoc.document

empname=doc.getitemvalue("empname")

age=doc.getitemvalue("Age")

Set RTItem=New NotesRichtextitem(doc,"Rich")

Forall m In empname

	Forall n In age

		

		Call RTItem.AddNewLine(1)

		Call RTItem.appendtext(m)

		Call RTItem.appendtext(" ")

		Call RtItem.appendtext(n)

		Call RTItem.AddNewLine(1)

		

	End Forall

End Forall

doc.form="test"

Call doc.save(True,False)

Call uidoc.document.replaceitemvalue("SaveOptions","0")

Call uidoc.close()

Call ws.editdocument(True,doc)

End Sub

Hope this wud work for u…

cheers

Subject: RE: NotesRichTextItem

Thanks ,

But appendtext method of RichTextItem does not delete previous value . I want to delete previous value and then set it with new value.

Subject: RE: NotesRichTextItem

Rich text is more complicated than normal fields.

Do you want to do this while a user is editing the document, or while the document is open in read mode, or while the document is not open?

It is an editable rich text, or computed?

Do you want to use a particular language?

Do you need to use styles, tables, etcetera, or just text?

How long is the text you want to insert.