SectionProperties.AddBeforeSlide Method
Adds a section immediately before the specified slide index, and returns the index of the new section.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Function AddBeforeSlide ( _
SlideIndex As Integer, _
sectionName As String _
) As Integer
'Usage
Dim instance As SectionProperties
Dim SlideIndex As Integer
Dim sectionName As String
Dim returnValue As Integer
returnValue = instance.AddBeforeSlide(SlideIndex, _
sectionName)
int AddBeforeSlide(
int SlideIndex,
string sectionName
)
Parameters
- SlideIndex
Type: System.Int32
The index of the slide before which to add the section.
- sectionName
Type: System.String
The name of the new section.
Return Value
Type: System.Int32
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.