This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jan 30, 2018, 6:08 PM
25 Posts
topic has been resolvedResolved

equivalent in ls for [TextsetFontcolor]

  • Category: Other
  • Platform: Windows
  • Release: 9.0.1
  • Role: Administrator
  • Tags:
  • Replies: 1

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

 

 

Jan 30, 2018, 6:39 PM
21 Posts
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% )


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal