Skip to main content
A newer version of this page is available. .

Sections

  • 2 minutes to read

The document is divided into logical Document.Sections. Each section in a SectionCollection defines its own page settings, such as SectionPage.PaperKind, page orientation (the SectionPage.Landscape property) and its margins. The Section.Page and Section.Margins properties enable you to access these settings.

You can specify different settings for the first page of a section by using the Section.DifferentFirstPage property.

Headers and Footers in the document belong to a particular section. To edit header or footer content, use the Section.BeginUpdateHeader - Section.EndUpdateHeader and the Section.BeginUpdateFooter - Section.EndUpdateFooter method pairs respectively.

The content of a section can be arranged into several columns, accessible using the Section.Columns property. To create columns, use the SectionColumns.CreateUniformColumns method.

The Line numbering feature can be activated for a particular section via the Section.LineNumbering property.

To insert a section at an arbitrary position, use the Document.InsertSection method.

The following commands can be executed to modify section settings.

Command Description
SetModerateSectionPageMarginsCommand Sets the top and bottom margins at one inch and the lateral margins at .75 inches.
SetNarrowSectionPageMarginsCommand Sets all margins at half-an-inch.
SetNormalSectionPageMarginsCommand Sets all margins at one inch.
SetWideSectionPageMarginsCommand Sets vertical margins at one inch and side margins at two inches.
SetSectionOneColumnCommand Sets the section to have only one column.
SetSectionTwoColumnsCommand Sets the section to have two columns.
SetSectionThreeColumnsCommand Sets the section to have three columns.