Table of Contents

Method SetPageColor

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

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

document WordDocument

The document.

at DocumentPosition

Where the edit's caret is, before and after.

color DocColor?

The colour, or null for none.

Returns

DocumentEdit

The edit; every page is repainted.