Rich text navigator - set the range to start at the beginning until you encounter a specific element possible?

Hi,

I was wondering if it was possible to set a rich text navigator range, to start at the beginning of a field and then end when it encounters a specific rich text element.

In my case, I have a rich text field and I would like to create a range starting from the beginning of the field, until it encounters a table. This range may contain, doc links, paragraphs or any other rich text elements (except tables). Then once the range has been set, I want to then copy the data out so I can append it to another RT field in a different document. (so basically I have copied everything in a RT field except for the table which will always be at the end of the field)

The problem I currently have is that when I initially set the navigator, I have to declare the rich text element to navigate but there is no ‘type’ that covers everything or the entire field. When using RTELEM_TYPE_TEXTRUN and RTELEM_TYPE_TEXTPARAGRAPH for the navigator, it stop after a newline.

Do I have to use some kind of complicated case switch embedded in a for loop or something?

Thanks in advance!