Sub Test() Dim s As Shape Dim pw As Double, ph As Double ActivePage.GetSize pw, ph For Each s In ActivePage.Shapes If s.Type <> cdrGuidelineShape Then ActiveDocument.ReferencePoint = cdrBottomLeft If s.PositionX < 0 Then s.PositionX = 0 If s.PositionY < 0 Then s.PositionY = 0 ActiveDocument.ReferencePoint = cdrTopRight If s.PositionX > pw Then s.PositionX = pw If s.PositionY > ph Then s.PositionY = ph End If Next s End Sub