I'm new to VBA and I'm trying to do something that looks simple to me, but very hard to realise.
Context:
I have a PPT presentation with 20 slides, in which each slide has 21 shapes, but the last one. Everytime I Want to add a new shape, it goes on the 1st slide, and thus I have to move every shapes to make room for the new one.
My problem: I found out how to move a shape to where I want using this code
With ActiveWindow.Selection.ShapeRange
.Left = XXX 'change the number for desired x position
.Top = XXX 'change the number for desired y position
End With
However this works only if I select the said 1st shape. Because I have hundreds of shapes, naming them all to move them would be too time consuming. So what I'd like to do is to tell VBA to Select the shape that is there:
.Left = 50
.Top = 50
And move it there
.Left = 140
.Top = 50
This looks very simple, but somehow I can't figure out how to do it. This thread comes close to what I want but not quite yet.
Thank you in advance.