LotusScript API SetBarColor Sample Code fails with notes abend

This fails on 8.0.2 and has not been tested on 8.5.Release 8.0.2 HHF206

Revision 20080809.0430-HHF206 (Release 8.0.2 HF623)

Standard Configuration

The LotusScript API SetBarColor sample fails with crash of client when running sample code.

Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim dc As NotesDocumentCollection
Set dc = db.UnprocessedDocuments
Dim doc As NotesDocument
Set doc = dc.GetFirstDocument
Dim rti As NotesRichTextItem
Set rti = doc.GetFirstItem(“Body”)
Dim rtnav As NotesRichTextNavigator
Set rtnav = rti.CreateNavigator
If Not rtnav.FindFirstElement(RTELEM_TYPE_SECTION) Then
Messagebox “Body item does not contain a section,”, _
“Error”
Exit Sub
End If
Dim rts As NotesRichTextSection
Dim colorObject As NotesColorObject
Do
Set rts = rtnav.GetElement
Set colorObject = session.CreateColorObject
colorObject.NotesColor = COLOR_BLUE
Call rts.SetBarColor(colorObject)
Call doc.Save(True, True)
Loop While rtnav.FindNextElement
End Sub