This example adds a table with 5 rows and 5 columns before the forth paragraph.
TextTables tables = document.getTables(); System.out.println(tables.getCount()); TextRange range = document.getParagraphs().item(4).getRange().getStart(); TextTable newTable = tables.add(range, 5, 5); newTable.setName("FirstTable"); System.out.println(tables.getCount());
Related information