Equivalent in ls for [TextsetFontcolor]

Hi !

I want to change the Size, Color and Font of a selected text in a document via “button click”.

Working is this formula:

@Command([TextSetFontSize]; “10”) ;
@Command([TextSetFontColor]; [blue]) ;
@Command( [TextSetFontFace] ; “Trebuchet MS” )

But I need a special RGB color for the FontColor, So I think it´s just possible in lotus script.

I´m searching for examples , because my ls knowledge is not sufficient .

Thanks in advance.

Steffi

Subject: This is how I do it

Assuming the rich text field is named Body;

Set style = Session.CreateRichTextStyle
style.FontSize = 14
style.NotesColor = Color_Gray
Set item = doc.GetFirstItem(fnBody)
If item.Type = RICHTEXT Then
Set Body = doc.GetFirstItem(fnBody)

Set range = Body.CreateRange()
Call range.SetStyle(style)
Body.Compact
Body.Update

.
.
.
doc.Save

I use this code in the backend. Almost certainly it won’t work in the UI without closing and reopening the doc.

To get any RBG color, use the NotesColorObject:

notesColor% = notesColorObject.SetRGB( red% , green% , blue% )