Class Fonts (PowerPoint VBA)

A collection of all the Font objects in the specified presentation. To use a Fonts class variable it first needs to be instantiated, for example


Dim fnts as Fonts
Set fnts = ActivePresentation.Fonts

Count

Returns the number of objects in the specified collection.


Dim lngCount As Long
lngCount = ActivePresentation.Fonts.Count

Item

Returns a single Font object from the specified Fonts collection.

Item (Index)

Index: The name or index number of the single Font object in the collection to be returned.


Dim fnt As Font
Set fnt = ActivePresentation.Fonts(Index:=1)

Replace

Replaces a font in the Fonts collection.

Replace (Original, Replacement)


Application.ActivePresentation.Fonts _
    .Replace Original:="Times New Roman", Replacement:="Courier"

Arguments

The following arguments are required:

Original (String) - The name of the font to replace.

Replacement (String) - The name of the replacement font.