Share via


Fonts.Replace Method

PowerPoint Developer Reference

Replaces a font in the Fonts collection.

Syntax

expression.Replace(Original, Replacement)

expression   A variable that represents a Fonts object.

Parameters

Name Required/Optional Data Type Description
Original Required String The name of the font to replace.
Replacement Required String The name of the replacement font.

Example

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

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

See Also