getNthElement (NotesRichTextNavigator - JavaScript)

Returns the element of a specified type at a specified position in a rich text item.

Defined in

NotesRichTextNavigator

Syntax

getNthElement(type:int, occurrence:int) : NotesBase
Parameter Description
int type
  • RTELEM_TYPE_DOCLINK (5)
  • RTELEM_TYPE_FILEATTACHMENT (8)
  • RTELEM_TYPE_OLE (9)
  • RTELEM_TYPE_SECTION (6)
  • RTELEM_TYPE_TABLE (1)
int occurrence The position of the element within elements of the same type in the rich text item.
Return value Description
element EmbeddedObject, RichTextDocLink, RichTextSection, or RichTextTable. The requested element. Returns null if there is no element.

Usage

An exception occurs if you try to get an element of type RTELEM_TYPE_TABLECELL (7), RTELEM_TYPE_TEXTPARAGRAPH (4), or RTELEM_TYPE_TEXTRUN (3). Access these elements through NotesRichTextRange.

This method moves the current position to the position of the retrieved element.