Fonts Property

Microsoft PowerPoint Visual Basic

Show All

Fonts Property

       

Fonts property as it applies to the Presentation object.

Returns a Fonts collection that represents all fonts used in the specified presentation. Read-only.

expression.Fonts

expression   Required. An expression that returns one of the above objects.

 

Fonts property as it applies to the DefaultWebOptions object.

Returns a WebPageFonts collection representing the set of available fonts for saving a presentation as a Web page. Read-only.

expression.Fonts

expression   Required. An expression that returns one of the above objects.

Example

As it applies to the Presentation object. 

This example replaces the Times New Roman font with the Courier font in the active presentation.

Application.ActivePresentation.Fonts _
    .Replace "Times New Roman", "Courier"

As it applies to the DefaultWebOptions object. 

This example sets the fixed-width font default Web option, specified by the character set constant msoCharacterSetEnglishWesternEuropeanOtherLatinScript, to be Courier New 10 points.

With Application.DefaultWebOptions _
    .Fonts(msoCharacterSetEnglishWesternEuropeanOtherLatinScript)
        .FixedWidthFont = "Courier New"
        .FixedWidthFontSize = 10
End With