Hallo zusammen,
danke für Eure Rückmeldungen. Ich habe es nun wie folgt gelöst:
Sub test()
' Get the position (Top, Left) of first object
Dim L As Single
Dim T As Single
With ActiveWindow.Selection
If .Type = ppSelectionShapes Then
L = .ShapeRange.Left
T = .ShapeRange.Top
ActiveWindow.Selection.Unselect
Else
MsgBox "You have not selected an Object."
Exit Sub
End If
End With
' Apply position on second object
Do While ActiveWindow.Selection.Type <> ppSelectionShapes
DoEvents
Loop
With ActiveWindow.Selection
If .Type = ppSelectionShapes Then
.ShapeRange.Left = L
.ShapeRange.Top = T
End If
End With
End Sub
|