Class TextStyles (PowerPoint VBA)

A collection of three text styles - title text, body text, and default text - each of which is represented by a TextStyle object. To use a TextStyles class variable it first needs to be instantiated, for example


Dim tss as TextStyles
Set tss = ActivePresentation.SlideMaster.TextStyles

Count

Returns the number of objects in the specified collection.


Dim lngCount As Long
lngCount = ActiveWindow.Selection.SlideRange(1).TextStyles.Count

Item

Returns a single text style from the specified TextStyles collection.

The Item method is the default member for a collection. For example, the following two lines of code are equivalent: ActivePresentation.Slides.Item(1) ActivePresentation.Slides(1) The Type parameter value can be one of these PpTextStyleType constants.

Item (Type)

Type: The text style type.


Dim tse As TextStyle
Set tse = ActivePresentation.SlideMaster.TextStyles(Type:=1)