

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. PowerPoint Object Model Reference Support and feedback Placeholders(2).TextFrame.TextRange = "This is subtitle text" With (Index:=1, Layout:=ppLayoutTitle).Shapes Whether you're using these to point to something specific on a slide or add an entirely new shape illustration you can add them. The following example adds a slide to the active presentation and then adds text to both the title and the subtitle (the subtitle is the second placeholder on a slide with this layout). It's easy to add lines and shapes to your PowerPoint presentation. If the specified slide has a title, use Shapes.Placeholders(1) or Shapes.Title to return the title placeholder. Use Shapes.Placeholders ( index), where index is the placeholder number, to return a Shape object that represents a placeholder. Patterned Pattern:=msoPatternHorizontalBrick ActivePresentation.Slides(1).Shapes.Range(Array(1, 3)).Fill _

The following example sets the fill pattern for shapes one and three in the active presentation. Use Shapes.Range ( index), where index is the shape's name or index number or an array of shape names or index numbers, to return a ShapeRange collection that represents a subset of the Shapes collection. PresetGradient Style:=msoGradientHorizontal, Variant:=1, _ Many presenters get limited by these shapes. ActivePresentation.Slides(1).Shapes(1).Fill _ Easy Custom Shapes Tricks in PowerPointPowerPoint has certain autoshapes readily available. The following example sets the fill to a preset shade for shape one in the active presentation. Use Shapes ( index), where index is the shape's name or index number, to return a single Shape object. ActivePresentation.Slides(1).Shapes.AddShape Type:=msoShapeRectangle, _ The following example adds a rectangle to the active presentation. Use the BuildFreeformmethod in conjunction with the ConvertToShapemethod to create a new freeform and add it to the collection. Use the AddCallout, AddComment, AddConnector, AddCurve, AddLabel, AddLine, AddMediaObject, AddOLEObject, AddPicture, AddPlaceholder, AddPolyline, AddShape, AddTable, AddTextbox, AddTextEffect, or AddTitlemethod to create a new shape and add it to the Shapes collection. If you want to do something (like delete or set a property) to all the shapes on a document at the same time, use the Rangemethod with no argument to create a ShapeRange object that contains all the shapes in the Shapes collection, and then apply the appropriate property or method to the ShapeRange object.
