Application.SnapToGuides 属性 (Publisher)

为 Microsoft Publisher 使用与参考线对齐在出版物页面上的对象。 读/写 Boolean

语法

表达式SnapToGuides

expression:表示 Application 对象的变量。

返回值

布尔值

示例

该示例在第一页上每隔半英寸添加水平和垂直标尺参考线,并设置选项将页面上的对象与参考线对齐。

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

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。