Table of Contents

Method AppendParagraph

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

AppendParagraph(WordDocument, string?)

Appends a paragraph to the document's last section, creating a section when the document has none.

public static Paragraph AppendParagraph(this WordDocument document, string? text = null)

Parameters

document WordDocument

The document.

text string

The paragraph text, or null for an empty paragraph.

Returns

Paragraph

The appended paragraph.

Exceptions

ArgumentNullException

document is null.

AppendParagraph(Section, string?)

Appends a paragraph to a section.

public static Paragraph AppendParagraph(this Section section, string? text = null)

Parameters

section Section

The section.

text string

The paragraph text, or null for an empty paragraph.

Returns

Paragraph

The appended paragraph.

Exceptions

ArgumentNullException

section is null.

AppendParagraph(TableCell, string?)

Appends a paragraph to a table cell.

public static Paragraph AppendParagraph(this TableCell cell, string? text = null)

Parameters

cell TableCell

The cell.

text string

The paragraph text, or null for an empty paragraph.

Returns

Paragraph

The appended paragraph.

Exceptions

ArgumentNullException

cell is null.

AppendParagraph(HeaderFooter, string?)

Appends a paragraph to a header or footer.

public static Paragraph AppendParagraph(this HeaderFooter part, string? text = null)

Parameters

part HeaderFooter

The header or footer.

text string

The paragraph text, or null for an empty paragraph.

Returns

Paragraph

The appended paragraph.

Exceptions

ArgumentNullException

part is null.

AppendParagraph(Note, string?)

Appends a paragraph to a footnote or endnote body.

public static Paragraph AppendParagraph(this Note note, string? text = null)

Parameters

note Note

The note.

text string

The paragraph text, or null for an empty paragraph.

Returns

Paragraph

The appended paragraph.

Exceptions

ArgumentNullException

note is null.