Change Text Color Of Any Richtext Field Background

Using NotesRichTextStyle Class you can change of color or format of any text within RichText Item Background. Code is an example for Mail Dim sess as New NotesSession Dim memo as New Notesdocument(sess.CurrentDatabase) Dim rt as New NotesRichTextItem(memo,"Body") Dim style as NotesRichTextStyle Set style=sess.CreateRichTextStyle memo.SendTo="Lotus 411" memo.Subject="Test" Call rt.AppendText("This is a test mail to test RichText style...

Class") Call rt.AddNewLine(2) 'Here is code which changes code to RED/BOLD/UNDERLINE style.Bold=True style.UnderLine=True style.NotesColor=COLOR_RED Call rt.AppendStyle(style) Call rt.AppendText(" D A N G E R") Call memo.Send(False) 'Above code will render DANGER in RED BOLD UNDERLINE Format 'If you are trying add text after this make sure you clear properties set for style ,other wise it render text after in RED color. to Clear style.Bold=False style.UnderLine=False style.NotesColor=COLOR_BLACK Call rt.AppendText(style)

This was first published in November 2000

Dig deeper on Domino Resources - Part 3

1 comment

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close