Share via


SectionProperties.AddBeforeSlide Method (PowerPoint)

Adds a section immediately before the specified slide index, and returns the index of the new section.

Syntax

expression .AddBeforeSlide(SlideIndex, sectionName)

expression A variable that represents a SectionProperties object.

Parameters

Name

Required/Optional

Data Type

Description

SlideIndex

Required

Integer

The index of the slide before which to add the section.

sectionName

Required

String

The name of the new section.

Return Value

Integer

Remarks

The indices of sections after the newly inserted section are automatically incremented by one.

If a section break exists immediately before the specified slide index, the new section is placed after the section break, with the result that the preceding section is now empty, and the specified slide index is now the first slide of the new section.

If the presentation does not contain any sections and you call this method, passing a SlideIndex value greater than 1, a new section is created before the first slide and given the default section name.

See Also

Concepts

SectionProperties Object

SectionProperties Object Members