Method AppendToList
AppendToList(Paragraph, int, int)
Makes a paragraph part of an existing numbered or bulleted list.
The paragraph references the concrete NumberingInstance that is already defined; no abstract definition is cloned. Cloning one would start a second counter and the list would restart mid-document.
public static Paragraph AppendToList(this Paragraph paragraph, int numberingId, int level = 0)
Parameters
paragraphParagraphThe paragraph.
numberingIdintThe numbering instance id (w:numId).
levelintThe zero-based list level (w:ilvl).
Returns
- Paragraph
The same paragraph, so calls chain.
Exceptions
- ArgumentNullException
paragraphis null.- ArgumentOutOfRangeException
levelis outside 0-8.- InvalidDocumentException
The document defines no numbering instance with that id (DXP1003).