Method FormatParagraphs
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
documentWordDocumentThe document that holds the span.
spanDocumentSpanThe span; an empty span is the paragraph it is in.
changeAction<ParagraphFormat>Changes a copy of each paragraph's format bag.
Returns
- DocumentEdit
The edit.
Exceptions
- ArgumentNullException
documentorchangeis null.- ArgumentException
The span is not in
document.- InvalidOperationException
An end is in a shape's text box.