Displaying info from rich text field

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

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

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 first published in February 2001