Refreshing richtext

I opening a dialog box thru an action button on form.The dialog box contains some fields. I am extracting those field’s value. (for e.g name, city , phone)

Now i wanted to show this details in a richtext field on the form. i m having a richtext field on the form.

I have programmed a lotusscript code using NotesRichTextitem, notesrichTexttable etc classes.

My problem is the richtext field doesnot get refresh immediately on form.

i have used uidoc.refresh(true) to refresh form.

Then also its not working.

but if i save that document and again open it then i can see the data in richtext field.

I want that the richtext field should be refresh immediately

can u provide me some guidance

Subject: refreshing richtext

Hi,

This is a very well known problem/issue/painfull thing with notes.

Using Lotusscript it is possible to manipulate richtext fields using both the notesrichtextitem and the notesrichtextstyle class. When working with the current document via the ui updates made to a richtext

Fields using these classes are not visible to the user until the document is saved and reloaded. This behavior only occurs for rich text fields and only occurs when you are manipulating richtext on the currently loaded ui document via the notesrichtextitem class.

For example. If you had a button on a document that had a richtext field “Body” and the code read.

Dim Wspace As New NotesuiWorkspace

Dim uiDoc As NotesuiDocument

Dim Doc As NotesDocument

Dim Body As Notesrichtextitem

Set uiDoc = Wspace.currentDocument

Set Doc = uiDoc.Document

Set Body = Doc.GetFirstItem(“Body”)

Call Body.AppendText(“A New Line”)

If the user presses the button they would see no change to the body field. If the user then save the document and closed the window and re opened the document they would see the new line added to the “Body” field.

The additional code required to achieve the refresh automatically is as follows:

Call Doc.Save(False,False)

doc.saveoptions = “0”

Call uidoc.close

Set uidoc = wspace.EditDocument(True, doc, False)

set doc = uidoc.document

doc.saveoptions = “1”

Check me at http://thehojusaram.blogspot.com/

Subject: RE: refreshing richtext

Update rich text tip.