Method RemoveHeaderFooter
RemoveHeaderFooter(WordDocument, Section, HeaderFooterKind, HeaderFooterType)
Takes a section's own header or footer of a type away: the section then uses the previous section's (Link to Previous), or none. The part leaves the document when no section uses it.
public static DocumentEdit RemoveHeaderFooter(this WordDocument document, Section section, HeaderFooterKind kind, HeaderFooterType type)
Parameters
documentWordDocumentThe document.
sectionSectionThe section.
kindHeaderFooterKindHeader or footer.
typeHeaderFooterTypeWhich pages.
Returns
- DocumentEdit
The edit (empty when the section has none of its own); its positions are the start of the section's first paragraph.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The section is not in
document, or a type is not defined.