Method FormatSettings
FormatSettings(WordDocument, DocumentPosition, Action<DocumentSettings>)
Changes the document's settings (settings.xml: different odd and even pages, default tab stop, …) as one
undoable edit. The change runs on a copy that replaces the settings; undo puts the instance back.
public static DocumentEdit FormatSettings(this WordDocument document, DocumentPosition at, Action<DocumentSettings> change)
Parameters
documentWordDocumentThe document.
atDocumentPositionchangeAction<DocumentSettings>Sets the values on the copy.
Returns
- DocumentEdit
The edit; every body, header and footer paragraph is reported changed, since settings can move every page.
Exceptions
- ArgumentNullException
documentorchangeis null.- ArgumentException
The position is not in
document.