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

SectionProperties Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.