Table of Contents

Method InsertBibliography

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

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

document WordDocument

The document.

at DocumentPosition

Where it goes (a paragraph is split there).

Returns

DocumentEdit

The edit; After is the start of the paragraph after it.

Exceptions

ArgumentNullException

document is null.

ArgumentException

The position is not in the document.

InvalidOperationException

The position is not in a paragraph of a block container.