RotationY Property

Microsoft Publisher Visual Basic

expression.RotationY

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

To set the rotation of the extruded shape around the x-axis, use the RotationX property of the ThreeDFormat object. To set the rotation of the extruded shape around the z-axis, use the Rotation property of the Shape object. To change the direction of the extrusion's sweep path without rotating the front face of the extrusion, use the SetExtrusionDirection method.

Example

This example adds three identical extruded ovals to the active document and sets their rotation around the y-axis to – 30, 0, and 30 degrees, respectively.

Sub SetRotationY()
    With ActiveDocument.Pages(1).Shapes
        With .AddShape(Type:=msoShapeOval, Left:=30, _
                Top:=120, Width:=50, Height:=25).ThreeD
            .Visible = True
            .RotationY = -30
        End With
        With .AddShape(Type:=msoShapeOval, Left:=90, _
                Top:=120, Width:=50, Height:=25).ThreeD
            .Visible = True
            .RotationY = 0
        End With
        With .AddShape(Type:=msoShapeOval, Left:=150, _
                Top:=120, Width:=50, Height:=25).ThreeD
            .Visible = True
            .RotationY = 30
        End With
    End With
End Sub