Sections Collection Object
Word Developer Reference |
A collection of Section objects in a selection, range, or document.
Remarks
Use the Sections property to return the Sections collection. The following example inserts text at the end of the last section in the active document.
Visual Basic for Applications |
---|
|
Use the Add method or the InsertBreak method to add a new section to a document. The following example adds a new section at the beginning of the active document.
Visual Basic for Applications |
---|
|
The following example displays the number of sections in the active document, adds a section break above the first paragraph in the selection, and then displays the number of sections again.
Visual Basic for Applications |
---|
|
Use Sections(index), where index is the index number, to return a single Section object. The following example changes the left and right page margins for the first section in the active document.
Visual Basic for Applications |
---|
|
See Also