WPS 基础接口 > 演示 API 参考 > Fonts > 方法 > Fonts.Replace 方法
替换 Fonts 集合中的一种字体。

语法

表达式.Replace(Original, Replacement)

表达式   一个代表 Fonts 对象的变量。

参数

名称 必选/可选 数据类型 描述
Original 必选 String 要替换的字体的名称。
Replacement 必选 String 替换字体的名称。

示例

本示例将当前演示文稿中的 Times New Roman 字体替换为 Courier 字体。

示例代码
Application.ActivePresentation.Fonts.Replace("Courier","Times New Roman")


请参阅