Table of Contents

Method Split

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

Split(WordDocument, int, int)

Extracts a run of sections into a new standalone document carrying only the definitions that run actually references.

public static WordDocument Split(this WordDocument document, int firstSectionIndex, int sectionCount)

Parameters

document WordDocument

The document to split. It is not modified.

firstSectionIndex int

The index of the first section to extract.

sectionCount int

The number of sections to extract.

Returns

WordDocument

The new document.

Exceptions

ArgumentNullException

document is null.

ArgumentOutOfRangeException

The section range is outside the document.

InvalidDocumentException

The document's media cannot be read because its package is already closed.