How to Copy NotesRichTextItem as a Variant

Written by alexander gokhfeld
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Copy NotesRichTextItem as a Variant
LotusScript language includes the control for managing rich text data type. (Jupiterimages/ Images)

Lotus Notes software gives users a set of tools to create e-mails, scheduling, information management and instant messaging custom applications. It includes LotusScript programming language with functions similar to Visual Basic language. The NotesRichTextItem control in LotusScript represents a Lotus Notes item that contains the rich text type of data. If a document is not saved, the rich text item cannot be copied from another rich text field. You can create a copy of the currently opened document with the rich text items by copying the NotesRichTextItem as a variant.

Skill level:

Other People Are Reading


  1. 1

    Click "Start" in Windows and then click "Lotus Notes."

  2. 2

    Click the "Tools" tab on the menu and then click "LotusScript Editor."

  3. 3

    Enter the following code in the open window:

      Dim doc As NotesDocument
      Dim rtitem As Variant
      '...set value of doc...
      Set rtitem = doc.GetFirstItem( "ProductDescription" )
      If rtitem.Type = RICHTEXT Then
       Call rtitem.AddNewLine( 1 )
       Call rtitem.AppendText _
       ( "Short-sleeved shirt,  green colour." )
      End If
      Call doc.Save( False, True )

    to copy the "Productdescription" rich-text item from the Lotus

    Notes database as a variant.

  4. 4

    Click "File" and then click "Save" to save the script with your Lotus Notes application.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.