Example: Name property

This example creates a table named "FirstTable".

  TextTables tables = document.getTables();
  TextRange range = document.getParagraphs().item(4).getRange().getStart();
  TextTable newTable = tables.add(range, 5, 5);
  newTable.setName("FirstTable");

Related information

Name property