Render document

I have a button with the LS below.The function of the button is to render the Uidocument,my problem is the object store on rich text field are not rendering.Any ideal !

Dim session As New notessession

Dim Workspace As New Notesuiworkspace

Dim uidoc As NotesUIdocument

Dim doc As Notesdocument

Dim faxdb As Notesdatabase

Set uidoc=workspace.Currentdocument

Set doc=uidoc.Document

Set faxdb=session.Currentdatabase

Dim faxdoc As New Notesdocument(faxdb)

Dim rtitem As NotesRichTextItem

Dim success As Variant

Set rtitem = New NotesRichTextItem( faxdoc ,"Body" )

success=doc.Rendertortitem(rtitem)

faxdoc.form="Teo"

Call workspace.EditDocument(True,faxdoc)

Subject: Render document

You probably have to save faxdoc before you open it in the UI.

Subject: 2 Possible reasons…

Set uidoc=workspace.Currentdocument	Call uidoc.Refresh(True)

Set doc=uidoc.Document

Set faxdb=session.Currentdatabase

Dim faxdoc As New Notesdocument(faxdb)

Dim rtitem As NotesRichTextItem

Dim success As Variant

Set rtitem = New NotesRichTextItem( faxdoc ,"Body" )

success=doc.Rendertortitem(rtitem)

faxdoc.form="Teo"

Call rtitem.Update

’ or for an R5 compatible solution:

’ Delete rtitem

Call workspace.EditDocument(True,faxdoc)