Font object (PowerPoint)
Represents character formatting for text or a bullet. The Font object is a member of the Fonts collection. The Fonts collection contains all the fonts used in a presentation.
Example
The following examples describes how to do the following:
Return the Font object that represents the font attributes of a specified bullet, a specified range of text, or all text at a specified outline level
Return a Font object from the collection of all the fonts used in the presentation
Use the Fontproperty to return the Font object that represents the font attributes for a specific bullet, text range, or outline level. The following example sets the title text on slide one and sets the font properties.
With ActivePresentation.Slides(1).Shapes.Title _
.TextFrame.TextRange
.Text = "Volcano Coffee"
With .Font
.Italic = True
.Name = "Palatino"
.Color.RGB = RGB(0, 0, 255)
End With
End With
Use Fonts (index), where index is the font's name or index number, to return a single Font object. The following example checks to see whether font one in the active presentation is embedded in the presentation.
If ActivePresentation.Fonts(1).Embedded = _
True Then MsgBox "Font 1 is embedded"
Properties
See also
PowerPoint Object Model Reference
Support and feedback
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.