PPT 批量更改字体、颜色

Sub OED01()
Dim oShape As Shape
Dim oSlide As Slide
Dim oTxtRange As TextRange
On Error Resume Next
For Each oSlide In ActivePresentation.Slides
For Each oShape In oSlide.Shapes
Set oTxtRange = oShape.TextFrame.TextRange
If Not IsNull(oTxtRange) Then
With oTxtRange.Font
.Name = “微软雅黑” ‘更改为需要的字体
.Color.RGB = RGB(Red:=0, Green:=0, Blue:=0) ‘改成想要的文字颜色,用RGB参数表示,黑色全为0,白色全为255
End With
End If
Next
Next
End Sub