Method InsertCitation
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
documentWordDocumentThe document.
atDocumentPositionWhere the citation goes.
requestCitationRequestThe 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.