Table of Contents

Method FormatParagraphs

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

FormatParagraphs(WordDocument, DocumentSpan, Action<ParagraphFormat>)

Changes the paragraph formatting of every paragraph a span touches.

public static DocumentEdit FormatParagraphs(this WordDocument document, DocumentSpan span, Action<ParagraphFormat> change)

Parameters

document WordDocument

The document that holds the span.

span DocumentSpan

The span; an empty span is the paragraph it is in.

change Action<ParagraphFormat>

Changes a copy of each paragraph's format bag.

Returns

DocumentEdit

The edit.

Exceptions

ArgumentNullException

document or change is null.

ArgumentException

The span is not in document.

InvalidOperationException

An end is in a shape's text box.