如何在整个演示文稿PPT VBA中更改项目符号颜色

时间:2019-03-06 14:58:47

标签: vba bullet

尝试更改演示文稿中不同项目符号的颜色。子弹有不同的形状。始终显示错误代码-2147024809。

您看到应该更改什么吗?非常感谢您的帮助!


Sub ReplacebulletColors()

Dim lFindColor As Long
Dim lReplaceColor As Long
Dim oSl As Slide
Dim oSh As Shape
Dim x As Long

lFindColor = RGB(1, 98, 155)
lReplaceColor = RGB(192, 0, 0)

For Each oSl In ActivePresentation.Slides
    For Each oSh In oSl.Shapes
        With oSh

            If .TextFrame.TextRange.ParagraphFormat.Bullet.Font.Color.RGB = lFindColor Then
                   .TextFrame.TextRange.ParagraphFormat.Bullet.Font.Color.RGB = lReplaceColor
            End If

        End With
    Next
Next

结束子

0 个答案:

没有答案