Swap object positions

C

checkin.just

Hi,

I want to swap the positions of two objects on a same slide. Is there
any add-in for this, or a macro code that I can use.

Thanks & regards,
Nizza
 
L

Luc

Nizza,
You could animate them with an animation path. In the custom animation task
pane choose add effect, animation path, choose which ever direction you want
to go to, or draw the path yourself starting from the middle of the object.
 
S

Steve Rindsberg

Hi,

I want to swap the positions of two objects on a same slide. Is there
any add-in for this, or a macro code that I can use.

Do you want this to happen in edit mode or during a slide show?
 
S

Steve Rindsberg

Sorry, I left the part out that I want this in the edit mode.

No problem. That makes it a great deal simpler. Here you go. Not elegant,
perhaps, but quick and easy to understand:

Sub SwapPositions()
' Swaps the positions of two (and only two) selected shapes

Dim lLeft1 As Long
Dim lTop1 As Long
Dim lLeft2 As Long
Dim lTop2 As Long

' test for correct number of selected shapes
With ActiveWindow.Selection.ShapeRange
If .Count <> 2 Then
MsgBox "Please select two and ONLY two shapes"
Exit Sub
Else
' get position of first shape
lLeft1 = .Item(1).Left
lTop1 = .Item(1).Top
' get position of second shape
lLeft2 = .Item(2).Left
lTop2 = .Item(2).Top
' now swap them
.Item(1).Left = lLeft2
.Item(1).Top = lTop2
.Item(2).Left = lLeft1
.Item(2).Top = lTop1
End If
End With

End Sub
 
Joined
Jul 17, 2014
Messages
2
Reaction score
0
there is a plugin that swaps shapes on the same slide in the website great-powerpoint-presentations[dot]com
 
Joined
Jul 17, 2014
Messages
2
Reaction score
0
Hi Nizza,

I created an addin that does swap shapes in powerpoint (see addin).
It also adds other 3 useful features:

1. Apply same sizes to shapes
2. Copy to all slides
3. Distribute objects in a grid

I hope you will enjoy and please let me know in case you think we can add some new feature!

Looking forward to your feedback.

Maurizio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top