Method SetDocumentDefaults
SetDocumentDefaults(WordDocument, DocumentPosition, Action<DocDefaults>)
Changes the document's defaults, Manage Styles > Set Defaults (Phase 150, WQ-0123): change
runs on a copy of DocDefaults (w:docDefaults) that replaces it. Every
style resolves over the defaults, so every paragraph of the body, the headers and footers and the notes is
reported changed. Styles and direct formatting are not touched.
public static DocumentEdit SetDocumentDefaults(this WordDocument document, DocumentPosition at, Action<DocDefaults> change)
Parameters
documentWordDocumentThe document.
atDocumentPositionchangeAction<DocDefaults>Changes the copy: its CharacterFormat and ParagraphFormat.
Returns
- DocumentEdit
The edit.
Exceptions
- ArgumentNullException
documentorchangeis null.- ArgumentException
The position is not in the document.