Rotation Property

Microsoft Publisher Visual Basic

expression.Rotation

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

Remarks

To set the rotation of a three-dimensional shape around the x-axis or the y-axis, use the RotationX property or the RotationY property of the ThreeDFormat object.

Example

This example matches the rotation of all shapes on the first page of the active publication to the rotation of the first shape. This example assumes there are at least two shapes on the first page of the active publication.

Sub SetShapeRotation()
    Dim sngRotation As Single
    Dim intCount As Integer
    With ActiveDocument.Pages(1).Shapes
        sngRotation = .Item(1).Rotation
        For intCount = 1 To .Count
            .Item(intCount).Rotation = sngRotation
        Next intCount
    End With
End Sub