This class is used to represent a section of the document. Many documents will only contain one section. More complex documents will divide the document into multiple sections. A section can be roughly correlated to a chapter in a book. Each section can have different formatting settings, including:
The following sample shows you how to get the add a new section to a document and how to get the first section of a document.
| Property |
Type |
Access |
Description |
| Border |
Border
|
read |
Returns a Border object that represents the border of this section at the specified location
|
| BorderAlwaysInFront |
boolean
|
read write |
Sets or returns a boolean that represents whether or not page borders for this section will always display in front of any objects it may overlap
|
| BorderAppliedTo |
BorderArea
|
read write |
Sets or returns a BorderArea object that represents where the page border will be applied to
|
| BorderOffsetsFromPage |
boolean
|
read write |
Sets or returns a boolean that represents whether or not the padding for this section's page border will be measured from the edge of the page or from the text it surrounds
|
| BottomMargin |
int
|
read write |
Sets or returns an int that represents the vertical distance of the bottom margin from the bottom edge of the page for this section
|
| Break |
Section.BreakType
|
read write |
Sets or returns a Section.BreakType object that represents the type of break (before) this section
|
| FirstLineNum |
int
|
read write |
Sets or returns an int that represents the number that the line numbering starts at for this section
|
| FirstPageNum |
int
|
read write |
Sets or returns an int that represents the number that the page numbering starts at for this section
|
| Footer |
Element
|
read |
Returns an Element object that represents the footer of the specified type for this section
|
| FooterY |
int
|
read write |
Sets or returns an int that represents the y coordinate of the footer measured from the top edge of the page
|
| GutterWidth |
int
|
read write |
Sets or returns an int that represents the gutter width for this section
|
| HasTitlePage |
boolean
|
read write |
Sets or returns a boolean that represents whether or not this section has a title page
|
| Header |
Element
|
read |
Returns an Element object that represents the header of the specified type for this section
|
| HeaderY |
int
|
read write |
Sets or returns an int that represents the y coordinate of the header measured from the top edge of the page
|
| LeftMargin |
int
|
read write |
Sets or returns an int that represents the horizontal distance of the left margin from the left edge of the page for this section
|
| LineNumbering |
Section.LineNumbering
|
read write |
Sets or returns a Section.LineNumbering object that represents the line numbering restart policy for this section
|
| LineNumberX |
int
|
read write |
Sets or returns an int that represents the x position of line numbers in twips
|
| LineNumModulus |
int
|
read write |
Sets or returns an int that represents the line numbering modulus
|
| LinesBetween |
boolean
|
read write |
Sets or returns a boolean that represents whether or not Word will draw vertical lines between columns
|
| NumColumns |
int
|
read write |
Sets or returns an int that represents the number of columns in this section
|
| PageHeight |
int
|
read write |
Sets or returns an int that represents the page height for this section in twips
|
| PageNumberFormat |
Section.NumberFormat
|
read write |
Sets or returns a Section.NumberFormat object that represents the page number format for this section
|
| PageOrientation |
Section.Orientation
|
read write |
Sets or returns a Section.Orientation object that represents the page orientation for this section
|
| PageSize |
int
|
read write |
Sets or returns the size of printed pages.
|
| PageWidth |
int
|
read write |
Sets or returns an int that represents the page width for this section in twips
|
| RestartPageNum |
boolean
|
read write |
Sets or returns a boolean that represents whether or not page numbering will restart at the beginning of this section
|
| RightMargin |
int
|
read write |
Sets or returns an int that represents the horizontal distance of the right margin from the right edge of the page for this section
|
| TopMargin |
int
|
read write |
Sets or returns an int that represents the vertical distance of the top margin from the top edge of the page for this section
|
| Unlocked |
boolean
|
read write |
Sets or returns a boolean that represents whether or not this section is unlocked
|