Method AppendParagraph
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
documentWordDocumentThe document.
textstringThe paragraph text, or null for an empty paragraph.
Returns
- Paragraph
The appended paragraph.
Exceptions
- ArgumentNullException
documentis null.
AppendParagraph(Section, string?)
Appends a paragraph to a section.
public static Paragraph AppendParagraph(this Section section, string? text = null)
Parameters
Returns
- Paragraph
The appended paragraph.
Exceptions
- ArgumentNullException
sectionis null.
AppendParagraph(TableCell, string?)
Appends a paragraph to a table cell.
public static Paragraph AppendParagraph(this TableCell cell, string? text = null)
Parameters
Returns
- Paragraph
The appended paragraph.
Exceptions
- ArgumentNullException
cellis null.
AppendParagraph(HeaderFooter, string?)
Appends a paragraph to a header or footer.
public static Paragraph AppendParagraph(this HeaderFooter part, string? text = null)
Parameters
partHeaderFooterThe header or footer.
textstringThe paragraph text, or null for an empty paragraph.
Returns
- Paragraph
The appended paragraph.
Exceptions
- ArgumentNullException
partis null.
AppendParagraph(Note, string?)
Appends a paragraph to a footnote or endnote body.
public static Paragraph AppendParagraph(this Note note, string? text = null)
Parameters
Returns
- Paragraph
The appended paragraph.
Exceptions
- ArgumentNullException
noteis null.