Resetting positions of shapes
Problem
PowerPoint doesn't allow you to lock shapes to prevent their being moved. Sometimes this can be very convenient, especially if you have to make edits to files you're not familiar with.
Solution
We can't make PowerPoint add shape locking, but the two little macros below are almost as good. Run the first on a presentation to record the position and size of each shape in the presentation.
Run the second to reset each shape to the recorded position/size.
The macro will not change the size/position of any shapes you've added, but will reset shapes you've copied after running the first macro.
Sub Setup()
Dim oSl As Slide
Dim oSh As Shape
For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
With oSh
.Tags.Add Name:="L", Value:=CStr(.Left)
.Tags.Add Name:="T", Value:=CStr(.Top)
.Tags.Add Name:="H", Value:=CStr(.height)
.Tags.Add Name:="W", Value:=CStr(.width)
End With
Next
Next
End Sub
Sub ReSet()
Dim oSl As Slide
Dim oSh As Shape
Dim sTest As String
For Each oSl In ActivePresentation.Slides
For Each oSh In oSl.Shapes
With oSh
' skip untagged shapes:
sTest = .Tags("L") & .Tags("T") & .Tags("H") & .Tags("W")
If Len(sTest) > 0 Then
.Left = CSng(.Tags("L"))
.Top = CSng(.Tags("T"))
.height = CSng(.Tags("H"))
.width = CSng(.Tags("W"))
End If
End With
Next
Next
End Sub
See How do I use VBA code in PowerPoint? to learn how to use this example code.