所以我的问题是这样的: 我想在超过250个演示文稿(文件)中更改文本形状的颜色。 我能做到这一点,如果发言都做这个活泼开朗:Powerpoint VBA循环遍历文件夹中的所有演示文稿
Sub ChangeShapeColor()
Dim oSh As Shape
Dim oSl As Slide
Dim prs As Presentation
For Each prs In Presentations
For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
If oSh.Fill.ForeColor.RGB = RGB(84, 133, 192) Then
oSh.Fill.ForeColor.RGB = RGB(0, 51, 204)
oSh.Fill.Transparency = 0.4
End If
If oSh.Fill.ForeColor.RGB = RGB(202, 24, 24) Then
oSh.Fill.ForeColor.RGB = RGB(212, 10, 10)
oSh.Fill.Transparency = 0.4
End If
Next oSh
Next oSl
Next prs
End Sub
但是所有的文件都存储在一个文件夹,然后更多的子文件夹英寸
我该如何调整代码,vba在一个循环内逐步打开一个特定文件夹中的所有其他演示文稿C:// xyz/xyx/presentations,执行该子文件并保存它?
在此先感谢
您应该考虑接受下面的答案。参见[当某人回答我的问题时应该怎么做](http://stackoverflow.com/help/someone-answers)。 – Rob