We are trying to remove section from the word documet but the connect of the document are overlapping.
code Below :
for (int i = doc.getSections().getCount() - 2; i >= 0; i--)
{
// Copy the content of the current section to the beginning of the last section.
doc.getLastSection().prependContent(doc.getSections().get(i));
// Remove the copied section.
doc.getSections().get(i).remove();
}
Document : 224276.docx (25.9 KB)