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
Syntax
public void PrependContent(
	Section sourceSection
)

Parameters

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

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.

Examples
Shows how to append content of an existing section. The number of sections in the document remains the same.
[C#]

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];
section.PrependContent(sectionToPrepend);

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