In this chapter:
Adding a New Section
The PageSetup Object
Properties of the Section Object
The HeaderFooter Object
The Section object represents a section in a document, range, or selection. Section objects are stored in the Sections collection. Each of the Document, Range, and Selection objects has a Sections property that returns a Sections collection containing the Section objects for that parent.
To add a new section to a document, range, or selection, use the Add method of the Sections collection. The syntax is:
The optional variant parameter
Range refers to a Range object before which the section break will be inserted. If this argument is omitted, the section break is inserted at the end of the document. The optional
Start parameter indicates the type of section break. It can be any of the following
Enum WdSectionStart wdSectionContinuous = 0 wdSectionNewColumn = 1 wdSectionNewPage = 2 wdSectionEvenPage = 3 wdSectionOddPage = 4 End Enum
The default value is
As an alternative to the Add method, you can insert a new section using the Insert-Break method, which applies to a Range or Selection object. Its syntax is:
expression refers to either a Range or a Selection object, and
Type can be any of the following
Enum WdBreakType wdSectionBreakNextPage = 2 wdSectionBreakContinuous ...