SectionProperties.AddSection Method
Adds a new section at the specified index position and returns the index of the newly created section.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Function AddSection ( _
sectionIndex As Integer, _
sectionName As Object _
) As Integer
'Usage
Dim instance As SectionProperties
Dim sectionIndex As Integer
Dim sectionName As Object
Dim returnValue As Integer
returnValue = instance.AddSection(sectionIndex, _
sectionName)
int AddSection(
int sectionIndex,
Object sectionName
)
Parameters
- sectionIndex
Type: System.Int32
The index of the section before which to add the section.
- sectionName
Type: System.Object
The name of the new section.
Return Value
Type: System.Int32
Remarks
If a section already exists at the specified index position, calling AddSection(Int32, Object) is equivalent to adding an empty section immediately before that section.
The indices of sections after the newly inserted section are automatically incremented by one.
sectionIndex can be one larger than the total number of existing sections, as long as it is less than the maximum number of sections allowed (512); this creates a new, empty section at the end.
If no sections exist in the presentation, calling this method and passing a sectionIndex value of 1 creates the first section.