To delete the main text of a section, use Section.ClearContent.
Example SectionsDeleteSectionContent
Shows how to delete main content of a section.
[C#]
Document doc = new Document(MyDir + "Document.doc");
Section section = doc.Sections[0];
section.ClearContent();
[Visual Basic]
Dim doc As Document = New Document(MyDir & "Document.doc")
Dim section As Section = doc.Sections(0)
section.ClearContent()
[Java]
Document doc = new Document(getMyDir() + "Document.doc");
Section section = doc.getSections().get(0);
section.clearContent();
To delete the headers and footers in a section, call Section.ClearHeadersFooters.
Example SectionsDeleteHeaderFooter
Clears content of all headers and footers in a section.
[C#]
Document doc = new Document(MyDir + "Document.doc");
Section section = doc.Sections[0];
section.ClearHeadersFooters();
[Visual Basic]
Dim doc As Document = New Document(MyDir & "Document.doc")
Dim section As Section = doc.Sections(0)
section.ClearHeadersFooters()
[Java]
Document doc = new Document(getMyDir() + "Document.doc");
Section section = doc.getSections().get(0);
section.clearHeadersFooters();