Sections Object
Publisher Developer Reference |
A collection of all the Section objects in the document.
Example
Use Sections.Item(index) where index is the index number, to return a single Section object. The following example sets the number format and the starting number for the first section of the active document.
Visual Basic for Applications |
---|
|
Using Sections(index) where index is the index number, will also return a single Section object. The following example sets continues the numbering from the previous section for the second section in the active document.
Visual Basic for Applications |
---|
|
Use Sections.Count to return the number of sections in the publication. The following example display the number of sections in the first open document.
Visual Basic for Applications |
---|
|
Use Sections.Add(StartPageIndex) where StartPageIndex is the index number of the page, to reutrn a new section added to a document. A "Permission denied." error will be returned if the page already contains a section head. The following example adds a new section to the second page of the active document.
Visual Basic for Applications |
---|
|
Use Sections(index).Delete where index is the index number, to delete the specified section from the document. A "Permission denied" error will be returned if an attempt is made to delete the first section. The following example deletes all of the sections of the active document except the first one.
Note |
---|
The iteration is from the last to the first to avoid a "Subscript out of range." error when accessing a deleted section in the Sections collection. |
Visual Basic for Applications |
---|
|
See Also