我的任务是在Powerpoint VBA中进行颜色填充。当我选择线和框时,我只想更改线并保留框的颜色。有没有办法只更改私人形状?
以下代码将在Powerpoint 2007中将幻灯片2中的所有线条颜色更改为红色:
Public Sub ChangeLineColours()
Dim shp As Shape
For Each shp In ActivePresentation.Slides(2).Shapes '<~~ Change '2' to whichever slide you want to loop through
If shp.Type = msoLine Then
shp.Line.ForeColor.RGB = RGB(255, 0, 0)
End If
Next shp
End Sub
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句