Sections.Add Method (Word)
Returns a Section object that represents a new section added to a document.
Syntax
expression .Add(Range, Start)
expression Required. A variable that represents a Sections collection.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Range |
Optional |
Variant |
The range before which you want to insert the section break. If this argument is omitted, the section break is inserted at the end of the document. |
Start |
Optional |
Variant |
The type of section break you want to add. Can be one of the WdSectionStart constants. If this argument is omitted, a Next Page section break is added. |
Example
This example adds a Next Page section break before the third paragraph in the active document.
Set myRange = ActiveDocument.Paragraphs(3).Range
ActiveDocument.Sections.Add Range:=myRange
This example adds a Continuous section break at the selection.
Set myRange = Selection.Range
ActiveDocument.Sections.Add Range:=myRange, _
Start:=wdSectionContinuous
This example adds a Next Page section break at the end of the active document.
ActiveDocument.Sections.Add