TextStyle Object

Microsoft PowerPoint Visual Basic

TextStyle Object

         
Master TextStyles (TextStyle)
Ruler
TextFrame
TextStyleLevels (TextStyleLevel)

Represents one of three text styles: title text, body text, or default text. Each text style contains a TextFrame object that describes how text is placed within the text bounding box, a Ruler object that contains tab stops and outline indent formatting information, and a TextStyleLevels collection that contains outline text formatting information. The TextStyle object is a member of the TextStyles collection.

Using the TextStyle Object

Use TextStyles(index), where index is either ppBodyStyle, ppDefaultStyle, or ppTitleStyle, to return a single TextStyle object. The following example sets the font name and font size for level-one body text on all the slides in the active presentation.

With ActivePresentation.SlideMaster _
        .TextStyles(ppBodyStyle).Levels(1)
    With .Font
        .Name = "Arial"
        .Size = 36
    End With
End With