Method InsertBibliography
InsertBibliography(WordDocument, DocumentPosition)
Inserts the bibliography at a position (Word's Bibliography > Insert Bibliography): a BIBLIOGRAPHY field whose result is a paragraph per source in the document's style (the Bibliography style, a hanging indent). One undo step.
public static DocumentEdit InsertBibliography(this WordDocument document, DocumentPosition at)
Parameters
documentWordDocumentThe document.
atDocumentPositionWhere it goes (a paragraph is split there).
Returns
- DocumentEdit
The edit; After is the start of the paragraph after it.
Exceptions
- ArgumentNullException
documentis null.- ArgumentException
The position is not in the document.
- InvalidOperationException
The position is not in a paragraph of a block container.