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
posted on 2009-12-13 23:07  王中胜  阅读(354)  评论(0编辑  收藏  举报