Method InsertCoverPage
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
documentWordDocumentThe document.
atDocumentPositionThe caret: kept, unless it was in the cover page replaced (then the start of what follows it).
designCoverPageDesignThe 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.