Method SetPageColor
SetPageColor(WordDocument, DocumentPosition, DocColor?)
Sets the page colour, Design > Page Color, as one undoable edit (WQ-0101): the document's background
(w:background) and, for a colour, w:displayBackgroundShape, which Word writes with it and without
which the colour is not painted. A null colour (No Color) removes the background and leaves the setting.
public static DocumentEdit SetPageColor(this WordDocument document, DocumentPosition at, DocColor? color)
Parameters
documentWordDocumentThe document.
atDocumentPositionWhere the edit's caret is, before and after.
colorDocColor?The colour, or null for none.
Returns
- DocumentEdit
The edit; every page is repainted.