Table of Contents

Method InsertCitation

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

InsertCitation(WordDocument, DocumentPosition, CitationRequest)

Inserts a citation of a source at a position (Word's Insert Citation): a CITATION field in a citation content control, its result the citation in the document's style. One undo step.

public static DocumentEdit InsertCitation(this WordDocument document, DocumentPosition at, CitationRequest request)

Parameters

document WordDocument

The document.

at DocumentPosition

Where the citation goes.

request CitationRequest

The source's tag and how it is cited (pages, volume, prefix, suffix, what is left out).

Returns

DocumentEdit

The edit; After is just past the citation.

Exceptions

ArgumentNullException

An argument is null.

ArgumentException

The position is not in the document, or no source has the tag.