Sub 批量更改PPT中公式的背景色()
Dim aSlide As Slide, aShape As Shape
On Error Resume Next '忽略错误
For Each aSlide In ActivePresentation.Slides '遍历幻灯片
For Each aShape In aSlide.Shapes '遍历图层对象
If aShape.Type = 7 Then '公式
With aShape
.Fill.ForeColor.RGB = RGB(255, 255, 0)
.Fill.Visible = msoTrue
.Fill.Solid
.Fill.BackColor.RGB = vbYellow
.Fill.Transparency = 0#
End With
End If
Next
Next
End Sub
Dim aSlide As Slide, aShape As Shape
On Error Resume Next '忽略错误
For Each aSlide In ActivePresentation.Slides '遍历幻灯片
For Each aShape In aSlide.Shapes '遍历图层对象
If aShape.Type = 7 Then '公式
With aShape
.Fill.ForeColor.RGB = RGB(255, 255, 0)
.Fill.Visible = msoTrue
.Fill.Solid
.Fill.BackColor.RGB = vbYellow
.Fill.Transparency = 0#
End With
End If
Next
Next
End Sub