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 last published in November 2000

Dig Deeper on Domino Resources - Part 3

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

but this is not working if mail was sending to external mail.Can you please suggest how to make this work if we are sending mail to external mail box
Cancel

-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