Dim obj, sect as rtSection
call ctxDump.getRichTextItem(doc,"Body")
Set enum = ctxDump.Sections
Do While enum.hasMoreElements
 Set obj =enum.nextelement
 obj.Title= obj.Title &" - modified on " &Date ' for section Text attribute refers to Title
 Set obj.Color = new rtColor (0)
 obj.Color.setRGB cint (10000*rnd) mod 255, cint (10000*rnd) mod 255, cint (10000*rnd) mod 255
 obj.Borders = clng(Rnd*Timer) Mod 6 ' random look for choices look in help for Borders / BARREC_BORDER_TWOLINE
 obj.Content.addNewLine 2
 obj.appendText obj.getText
Loop
|