Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.SnapToObjects Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

True for Microsoft Publisher to use objects on a page to line up other objects. Read/write Boolean.

Syntax

expression. SnapToObjects

_expression_A variable that represents a Application object.

Return Value

Boolean

Example

This example adds horizontal and vertical ruler guides every half inch on the first page and sets the options to align objects on the page to the guides.

Sub SetSnapOptions() 
 Dim intCount As Integer 
 Dim intPos As Integer 
 With ActiveDocument.Pages(1).RulerGuides 
 For intCount = 1 To 16 
 intPos = intPos + 36 
 .Add Position:=intPos, Type:=pbRulerGuideTypeVertical 
 Next 
 intPos = 0 
 For intCount = 1 To 21 
 intPos = intPos + 36 
 .Add Position:=intPos, Type:=pbRulerGuideTypeHorizontal 
 Next 
 End With 
 With Application 
 .SnapToGuides = True 
 .SnapToObjects = True 
 End With 
End Sub

See also

Concepts

Application Object

© 2018 Microsoft