Richtextnavigator and richtextrange

Hi,

I’m having trouble with a fragment of code concerning the richtextnavigator and richtextrange. This used to work fine in R7 but now I have to use the same code in R8.0.2 and it goes wrong.

The richtextitem just contains text with some parts between “{” and “}”. I want to get those parts. Asume that the rtitem below is that richtextitem and it has already been set and it contains the string “some text {keyword} some more text”

function ParseRTI(rtItem As NotesRichTextItem)

Dim rtNavS As NotesRichTextNavigator

Dim rtRange As NotesRichTextRange

Dim sSearchS$, sSearchE$

Set rtNavS = rtItem.CreateNavigator

Set rtRange = rtItem.CreateRange

sSearchS = “{”

sSearchE = “}”

If rtNavS.FindFirstString(sSearchS, RT_FIND_CASEINSENSITIVE) Then

Call rtRange.SetBegin(rtNavS)

Call rtNavS.FindNextString(sSearchE, RT_FIND_CASEINSENSITIVE)

Call rtRange.SetEnd(rtNavS)

sRaw = rtRange.TextRun

end if

All goes well up till the Call rtRange.SetBegin… the range holds “{keyword} some more text”, but the next two lines are the problem. When it executes the line Call rtRange.SetEnd(rtNavS) I just get “{” in my range. When the same code is executed in R7 I get “{keyword” in my range.

Any ideas on what may be the problem and a possible solution are much appreciated.

thanks,

Arno.