In PowerPoint VBA, how to push all existing shapes in a window (not just one)?

As far as I understand, this code “captures” only the first figure in the active window and pushes it:

Set oShape = oSlide.Shapes (1)

oShape.Left = oShape.Left + 5

How can I “capture” all the shapes in the window and immediately push them?

+3
source share
1 answer

You can probably iterate over the current slide Shapesto set each one.

Dim oShape As Shape

For Each oShape In oSlide.Shapes
    oShape.Left = oShape.Left + 5
Next
+4
source

Source: https://habr.com/ru/post/1722506/


All Articles