

The following example shows how you can add all types of headers and footers to a document section. If you need different headers and footers on various pages, you can set up multiple sections and create the desired headers and footers for each one of them. In other words, you can define different headers and footers for the first page, even pages, and odd pages. Each Section.HeadersFooters collection can contain only one instance of each HeaderFooterType type. They are defined for each Section element, whose content can occupy one or more pages.

When using the GemBox.Document you can represent headers and footers with HeaderFooter elements, repeated on each page. With GemBox.Document, you can add footers and headers programmatically to your Word documents in C# and VB.NET. Check the 'Different first page' checkbox. You can place a header's content at the top of the page and add a footer's content at the bottom. When the Page Setup window appears, click on the Layout tab.

Headers and footers are parts of Word documents usually used for complementary information such as the date, page number, author's information, or company logos.
