下面是我自己写的脚本,但是运行后仍有部分白色字没有更改颜色,求指导!
Sub changecolor()
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
If (oTxtRange.Font.Color.RGB = RGB(Red:=255, Green:=255, Blue:=255)) Then
With oTxtRange.Font
.Color.RGB = RGB(Red:=0, Green:=0, Blue:=0) '改成想要的文字颜色,用RGB参数表示
End With
End If
End If
Next
Next
End Sub