SectionPrependContent Method
Inserts a copy of content of the source section at the beginning of this section.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.10
public void PrependContent(
	Section sourceSection


Type: Aspose.WordsSection
The section to copy content from.

Only content of Body of the source section is copied, page setup, headers and footers are not copied.

The nodes are automatically imported if the source section belongs to a different document.

No new section is created in the destination document.

Shows how to append content of an existing section. The number of sections in the document remains the same.

Document doc = new Document(MyDir + "Section.AppendContent.doc");

// This is the section that we will append and prepend to.
Section section = doc.Sections[2];

// This copies content of the 1st section and inserts it at the beginning of the specified section.
Section sectionToPrepend = doc.Sections[0];

// This copies content of the 2nd section and inserts it at the end of the specified section.
Section sectionToAppend = doc.Sections[1];
See Also