Appending Rich Text to an already exisiting field

I’ve read in the help files about RichTextStyles and looked at their samples. They all pertain to creating and sending an email to someone. I was wondering if it’s possible to append rich to text to an already existing Rich Text Field in a document? I’ve tried modifying the code given in their samples but I can’t seem to make it work.

Any help is appreciated

Tom

Subject: Appending Rich Text to an already exisiting field

You certainly can. Things to watch for:

  1. Make sure you save at the end

  2. The rich text won’t display until you open and close the document

  3. Make sure you get a handle on the rich text field properly.

Having said that, what errors are you seeing? What is, or is not, happening? What code did you try?

Subject: RE: Appending Rich Text to an already exisiting field

  1. The rich text won’t display until you open and close the document

This might be the problem. On closing and reopening my document I saw the changes I was trying to do. So Rich Text doesn’t update until you close the document, unlike regular text fields which update instantly?

Subject: RE: Appending Rich Text to an already exisiting field

Right. You can think of the Rich Text Editor in the UI as an application, and the Rich Text Item on the document as the “file” it creates. You have changed the stored “file” while a user has the document open; the changes you made won’t be visible in the version of the “file” the user opened.

You can programmatically close and re-open the document (or create a new document based on the existing one, then swap documents). In use, the user will just see a flash.

Subject: RE: Appending Rich Text to an already exisiting field

Fantastic! Thank you all very much. That also explains why using the Refresh and Reload methods weren’t working.

Subject: RE: Appending Rich Text to an already exisiting field

See also this: http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/dd507a5be7cc2e4285256eec005f56ef?OpenDocument

Subject: RE: Appending Rich Text to an already exisiting field

Thanks for the link, it’s good information.

Subject: Appending Rich Text to an already exisiting field

try NotesRichTextItem.AppendRtItem

Extract from help:

Inserts the contents of one rich text item in another.

Defined in

NotesRichTextItem

Syntax

Call notesRichTextItem.AppendRTItem( notesRichTextItem2 )

Parameters

notesRichTextItem2

The item to be appended. If you specify Nothing, this method generates an error.

Usage

By default the insertion occurs at the end of the item. You can change the insertion point with BeginInsert and EndInsert.

Nicolas Abesdris

Quintessence e-solutions Inc.