Problem with getting value of rich text field from the NotesUIDocument

Hi All, I am new to application development using Notes. I am trying to develop a form which has to be saved as two documents ( a parent and child document ).

Say for example, if the form has 4 fields, the first 2 fields go into the parent document and the rest of the 2 field go in to the child document. I have written lotusscript code for creating two documents and saving them.

The approach i have taken is get the value of the field from the NotesUIDocument using the FieldGetText method, create a NotesItem in the document and save the document.

The problem is am facing is in getting the contents of a rich text field. If i use FieldGetText, i am getting a string with all formatting gone. But i need the contents of the richtext field with all the formatting so that i can create a NotesRichTextItem in the document.

Is there any method in the NotesUIDocument class to get this done ?

Regards,

Reghu Ram.

Subject: Problem with getting value of rich text field from the NotesUIDocument

Hi,

try getting the backend document from frontend document and copy the richtext item

soething like

Set doc = uidoc.docoument

set newdoc.richtext = doc.Richtextitem

HTH

Keshava

Subject: RE: Problem with getting value of rich text field from the NotesUIDocument

Hi Keshava, Thanks for the inputs. I was able to achieve what i wanted but i want to know, if there is a better way to achieve this without saving the UIDoc since that will create an additional document in my case which is not needed.