Table of Contents

Method InsertCoverPage

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

InsertCoverPage(WordDocument, DocumentPosition, CoverPageDesign)

Inserts a cover page at the start of the document, replacing the one it has. One undo step.

public static DocumentEdit InsertCoverPage(this WordDocument document, DocumentPosition at, CoverPageDesign design)

Parameters

document WordDocument

The document.

at DocumentPosition

The caret: kept, unless it was in the cover page replaced (then the start of what follows it).

design CoverPageDesign

The design.

Returns

DocumentEdit

The edit.

Exceptions

ArgumentNullException

An argument is null.

ArgumentException

The position is not in the document.

InvalidOperationException

The document has no section.