Add Method (Slides Collection Object)
Applies To
Slides collection object.
Description
Creates a new slide and adds it to the collection of slides in the specified presentation. Returns a Slide object that represents the new slide.
Syntax
expression.Add(Index, Layout)
expression Required. An expression that returns a Slides collection.
Index Required Long. Specifies the index number the new slide will have within the Slides collection. This value cannot exceed the number of existing slides + 1.
Layout Required Long. Can be one of the following PpSlideLayout constants:
| |
| |
- ppLayoutClipArtAndVerticalText
| |
| |
| |
| |
| |
| |
| |
- ppLayoutTextAndTwoObjects
| |
(continued)
| |
| - ppLayoutTwoObjectsAndText
|
- ppLayoutTwoObjectsOverText
| |
- ppLayoutVerticalTitleAndText
| - ppLayoutVerticalTitleAndTextOverChart
|
Remarks
To alter the layout of an existing slide, use the Layout property.
Example
This example adds a slide that contains a title placeholder at the beginning of the active presentation.
ActivePresentation.Slides.Add 1, ppLayoutTitleOnly
This example adds a blank slide at the end of the active presentation.
With ActivePresentation.Slides
.Add .Count + 1, ppLayoutBlank
End With