Font Object
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

Font Object

Office 2007
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 Font property 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.

Visual Basic for Applications
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.

Visual Basic for Applications
If ActivePresentation.Fonts(1).Embedded = _
    True Then MsgBox "Font 1 is embedded"



Show:
© 2016 Microsoft