Moving Rich Text from UI doc to new backend doc with LotusScript

I’d like to move contents of a Rich Text field, including the formating like bullets, to a new back-end doc. I don’t believe this was possible in R5 unless you saved the UI doc. I don’t want to save the UI doc. I see a new rich text item method called “Update”. The help file has no working examples. Has anyone got this method to work or is what I’m trying to do still impossible?Thanks.

Subject: Moving Rich Text from UI doc to new backend doc with LotusScript

What you’re asking for was possible in Notes 5, with some restrictions.

First, to get the current contents of the rich text field including the user’s recent edits, call NotesUIDocument.Refresh(True).

From that point, you can copy the rich text item to a new back-end document that you create.

R5 LotusScript fails to copy file attachments and font selections (other than the default Notes fonts) when copying a rich text field. With R5, you can probably do it using copyallitems, then get rid of those you don’t want. In Notes 6, just use NotesRichTextItem.CopyItemToDocument.

The NotesRichTextItem.Update method, which you mention, is not needed if you’re just going to save the back-end document to disk or mail it. However, if you use NotesUIWorkspace.EditDocument or DialogBox to display that document without saving it, then you should call Update on the rich text field first. This makes your updates to the rich text visible when the document is displayed.

  • Andre Guirard
    IBM Lotus Software
    Enterprise Integration Team

Subject: RE: Moving Rich Text from UI doc to new backend doc with LotusScript

I added the call NotesUIDocument.Refresh(True) and used the NotesRichTextItem.CopyItemToDocument method as you suggested and it worked!(on a R6 test server) The output held all attributes including bold, italic and bullets. I tried on the R5 server and I lost the bullets. We’re moving to R6 soon so I’ll be ready.

Thank you