Class CoverPageEditingExtensions
Insert > Cover Page as Word inserts one (Phase 175, WQ-0156): a gallery entry in a Cover Pages building-block content control at the start of the document, ending in a page break inside the control; another cover page replaces it; Remove Current Cover Page takes it away. One undo step each.
public static class CoverPageEditingExtensions
- Inheritance
-
CoverPageEditingExtensions
- Inherited Members
Remarks
Measured in Word's own report templates (Templates/1033/*Report.dotx) and tools/Probe-WordCoverPage.ps1:
the control is the body's first block, w:docPartObj with w:docPartGallery "Cover Pages" and
w:docPartUnique, and its last paragraph holds the page break, so removing it leaves no empty page. The
fields are plain-text controls bound to the document's properties (Phase 174), so the cover shows them and typing
on it sets them.
Methods
- HasCoverPage(WordDocument)
Whether the document has a cover page (a Cover Pages control at the start of its body).
- InsertCoverPage(WordDocument, DocumentPosition, CoverPageDesign)
Inserts a cover page at the start of the document, replacing the one it has. One undo step.
- RemoveCoverPage(WordDocument, DocumentPosition)
Removes the document's cover page (Word's Remove Current Cover Page). One undo step; empty when there is none.