Method GetEffectiveHeaderFooter
GetEffectiveHeaderFooter(WordDocument, Section, HeaderFooterKind, HeaderFooterType)
The header or footer a section uses: its own, else the nearest previous section's (Link to Previous), or null.
public static HeaderFooter? GetEffectiveHeaderFooter(this WordDocument document, Section section, HeaderFooterKind kind, HeaderFooterType type)
Parameters
documentWordDocumentThe document.
sectionSectionThe section.
kindHeaderFooterKindHeader or footer.
typeHeaderFooterTypeWhich pages.
Returns
- HeaderFooter
The part, or null when no section up to this one has one.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The section is not in
document.