Partager via


Presentation.SnapToGrid Property (PowerPoint)

Determines whether to snap shapes to the gridlines in the specified presentation. Read/write.

Syntax

expression .SnapToGrid

expression A variable that represents a Presentation object.

Return Value

MsoTriState

Remarks

The value of the SnapToGrid property can be one of these MsoTriState constants.

msoFalse

msoTrue

Example

This example switches snapping shapes to the gridlines in the active presentation.

Sub ToggleSnapToGrid()

    With ActivePresentation

        If .SnapToGrid = msoTrue Then

            .SnapToGrid = msoFalse

        Else

            .SnapToGrid = msoTrue

        End If

    End With

End Sub

See Also

Concepts

Presentation Object Members

Presentation Object