rtPopup rtSection rTextParagraph
All rich text content is split in paragraphs. Each rTextParagraph class object represents one paragraph.
The paragraph may contain all other elements like pictures ( rtGraphic), doclinks ( rtNoteLink and rtHotLink), text ( rTextRun), etc. The paragraph may not contain other paragraphs except indirectly as a content of tables, sections or hotspots.
A table ( rtTable) occupies it's own paragraph. No other text should be present in this paragraph.
set rtParaObject = rtContainerObject.getFirst (RT_OBJ_TEXTPARAGRAPH)
Do while Not rtParaObject is Nothing
... process it
set rtParaObject = rtContainerObject.getNext (RT_OBJ_TEXTPARAGRAPH, Nothing)
Paragraph contains any other objects (not paragraphs). In order to examine paragraph content use the same methods applied to paragraph content:
set linkObj = rtParaObject.Content.getFirst (RT_OBJ_NOTELINK)
or equivalent form
set linkObj = rtParaObject.getFirst (RT_OBJ_NOTELINK)
Some objects like sections and tables have their own content. The paragraphs of this content may be reached applying getFirst and getNext methods to the content of these objects. Thus the sample:
set rtParaObject = rtContObject.getFirst (RT_OBJ_TEXTPARAGRAPH)
... if the paragraph contains a table or a section or hotspot, the paragraphs in table/section/hotspot may not be returned by the getNext method applied to top container
' this returns next paragraph on top level
set rtParaObject = rtContObject.getNextElement
' this returns the 1st paragraph of the content of rtParaObject
set rtParaIncludedObject = rtParaObject.getFirstElement(RT_OBJ_TEXTPARAGRAPH)