Section Object (Publisher)

Represents a Section of a publication or document.

Use Sections.Item(index) where index is the index number, to return a single Section object. The following example sets a Section object to the first section in the Sections collection of the active document.

Dim objSection As Section 
Set objSection = ActiveDocument.Sections.Item(1)

Use Sections.Add(StartPageIndex) where StartPageIndex is the index number of the page, to return 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 Section object to the second page of the active document.

Dim objSection As Section 
Set objSection = ActiveDocument.Sections.Add(StartPageIndex:=2)
Show:
© 2015 Microsoft