This example adds a section and sets the second section as the new section's link section.
TextSections sections = document.getSections(); TextSection section = sections.item(2); TextSection newSection = sections.add("New section", document.getParagraphs().item(1).getRange(), 1); newSection.setLink(section.getName());
Related information