Share via


Presentation.SnapToGrid Property

PowerPoint Developer Reference

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.

Visual Basic for Applications
  Sub ToggleSnapToGrid()
    With ActivePresentation
        If .SnapToGrid = msoTrue Then
            .SnapToGrid = msoFalse
        Else
            .SnapToGrid = msoTrue
        End If
    End With
End Sub

See Also