Cells As rtCell
Table As rtTable
Table row representation. Not used as an independent object.
Row (and Column - rtColumn) Properties are used to access table content. Additionally properties TabLabel and RowLabel may be used assign the name to tabbed table tab and row name.
Syntax rtTableObject.Cells(3,4) and rtTableObject.Rows(3).Cells(4) are equivalent.
Row may be deleted:
rtTableObject.removeRow 3 or
set rtRowObject = rtTableObject.Rows(3)
... do some code that verifies that row should be removed..
Rows may not be moved to another table, however it can be done cell by cell:
Forall c in rtRowObject
Set NewrtTableObject.Cells (newRowNr, c.ColumnNumber) = c
This sample copies cell from one table to another.
If the new table contained less columns than the old one it will have extra columns added. When columns are counted both visible and merged are used, so if the column count does not seem to match, check if some cells are not merged.
For text search and replace purposes the text will be located in new table. However when written to item it will be present in both tables. To move the cell you must add a line of code to remove it from the old table:
or remove all oldTable from the item: