In PowerPoint VBA, how to nudge all the present shapes in the window (not only one)?
-
19-09-2019 - |
Question
As far as I understand, this code "grabs" only the first shape in the active window and nudges it:
Set oShape = oSlide.Shapes(1)
oShape.Left = oShape.Left + 5
How can I "grab" all the shapes in the window and nudge them all at once?
Solution
You could probably iterate through the current slide's Shapes
collection to set each one.
Dim oShape As Shape
For Each oShape In oSlide.Shapes
oShape.Left = oShape.Left + 5
Next
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow