Table of Contents

Method SplitParagraph

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

SplitParagraph(WordDocument, DocumentPosition)

Splits a paragraph at a position, as Enter does.

public static DocumentEdit SplitParagraph(this WordDocument document, DocumentPosition at)

Parameters

document WordDocument

The document that holds the position.

at DocumentPosition

Where to split.

Returns

DocumentEdit

The edit; After is the start of the new second paragraph.

Exceptions

ArgumentNullException

document is null.

ArgumentException

The position is not in document, or falls inside a surrogate pair.

ArgumentOutOfRangeException

The position's offset is outside its paragraph's content.

InvalidOperationException

The position is inside an inline content control or inside content a reader synthesized, or the paragraph is not in a block container.