Have you ever tried to INSERT a RichTextItem into an existing RichTextItem instead of appending it ?
Let’s see how we could accomplish this. Actually there is no explicit method in the NotesRichText class to insert an item, but let’s see what the AppendRTItem method could do for us.
Oh, YES, here it is … right from the designer help ( version 6.5.1 ):
By default the insertion occurs at the end of the item. You can change the insertion point with BeginInsert and EndInsert.
This is easy, here is the code
Dim ses As New notessession
Dim db As NotesDatabase
Dim col As notesdocumentcollection
Dim doc As NotesDocument
Dim rtitem2 As NotesRichTextItem
Dim rtitem1 As NotesRichTextItem
Dim rtnav As NotesRichTextNavigator
Set rtitem1 = doc.getfirstitem("Body")
Set rtitem2 = doc.getfirstitem("RTF")
Set rtnav = rtitem.CreateNavigator
Call doc.save(True, True)
But what is this ? When you execute the code you’ll get an error message: “Method is not available.”
Hmm, do a search on the Lotus Notes KnowledgeBase and you’ll find this entry. And you can see in the document that there is an SPR# LGAA5N6FHT. But , huuuh, what is that ?
and was determined not to be a software problem. Notes and Domino are functioning as designed.
Does the documentation does not implies that it IS possible ? OK, it takes some time to code a new function and do all the quality stuff ( the KB document ist from the year 2004 as well as the mentioned SPR ) . Maybe they built it into the Notes 7 codestream.
But, NO WAY !!! Instead of having it got to work they just changed the designer help.
The insertion occurs at the end of the item. AppendRTItem cannot be called after BeginInsert.
IBM. please don’t tell me that ist is not possible to build this function !!! You’ve had 2 years. Instead of NEW classes and methods and stuff you should rather finish the coding of already intended methods in existing classes.
If you are not able to do the coding, please ask Ben Langhinrichs. He is able to solve the problem. And inserting RTItems the same way as inserting pure text after BeginInsert is a function that is needed, indeed.
I’ll hope tha some of the new guys at IBM will listen to the customers needs.