Q

Displaying info from rich text field

How can I display some info from a richtext field in a view - or even just flag that there is some info in an Rt field (by an icon ??)
You can display the text from a rich text field in a view by creating another field that contains the "text-only" contents of the rich text field and display that in your view. You could use the GetFormattedText method of NotesRichTextItem to do this in a closing event for your form.

Example....
.... where NotesDoc is your existing variable pointing to the NotesDocument
.... object you're working with and "converted_rich_text" is the new field you
.... want to create containing the text that is in your Rich Text field

Sub QueryClose
dim plain_text as string
dim rich_text_item as NotesRichTextItem
set rich_text_item = NotesDoc.GetFirstItem( "RichTextItemName_Here" )
plain_text = notesRichTextItem.GetFormattedText( strip_tabs,length_of_line )
Call NotesDoc.ReplaceItemValue( "converted_rich_text", plain_text )
End Sub

This was last published in February 2001

Dig Deeper on Domino Resources - Part 3

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

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.

-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