Table of Contents

Method RemoveHeaderFooter

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

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

document WordDocument

The document.

section Section

The section.

kind HeaderFooterKind

Header or footer.

type HeaderFooterType

Which 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.