Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lotus Script

Status
Not open for further replies.

sccice

Programmer
Apr 5, 2001
4
GB
How can i Change the text color and background colour of a field when writing to it via lotus scripting
 
The field in question has to be defined as 'Rich Text' on the form for you to be able to change the colour, font, size etc (background is anyone's guess though!). The below piece of script should, after declaring rtitem, richstyle, maildoc and session append the text "A new line here" to the field 'body' with the listed font, size, colour and bolding.

Set rtitem = New NotesRichTextItem( maildoc, "Body" )
Set richStyle = session.CreateRichTextStyle
richStyle.NotesFont = FONT_ROMAN
richStyle.FontSize = 10
richStyle.Bold = True
richStyle.NotesColor = COLOR_DARK_BLUE
Call rtitem.AppendStyle(richStyle)
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText( "A new line here" )

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top