Export (0) Print
Expand All

ZOrder Method

Office 2003

Moves the specified shape in front of or behind other shapes in the collection (that is, changes the shape's position in the z-order).

expression.ZOrder(ZOrderCmd)

expression    Required. An expression that returns a Shape object.

MsoZOrderCmd can be one of these MsoZOrderCmd constants.
msoBringForward
msoBringInFrontOfText For use in Microsoft Word only.
msoBringToFront
msoSendBackward
msoSendBehindText For use in Microsoft Word only.
msoSendToBack

Remarks

Use the ZOrderPosition property to determine a shape's current position in the z-order.

Example

This example adds an oval to myDocument and then places the oval second from the back in the z-order if there is at least one other shape on the slide.

Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.AddShape(msoShapeOval, 100, 100, 100, 300)
    While .ZOrderPosition > 2
        .ZOrder msoSendBackward
    Wend
End With
		




Show:
© 2015 Microsoft