RulerGuide 对象 (Publisher)
表示一条网格线,用于对齐页面上的对象。 RulerGuide 对象是 RulerGuides 的成员 集合。
备注
使用 添加 要创建新的标尺网格线的 RulerGuides 集合的方法。
使用 项目 要引用的标尺参考线的属性。
使用 Position 属性可更改网格线的位置。
使用 Delete 方法删除网格线。
示例
本示例创建新的标尺参考线,移动它,,然后将其删除。
Sub AddChangeDeleteGuide()
Dim rgLine As RulerGuide
With ActiveDocument.Pages(1).RulerGuides
.Add Position:=InchesToPoints(1), _
Type:=pbRulerGuideTypeVertical
MsgBox "The ruler guide position is at one inch."
.Item(1).Position = InchesToPoints(3)
MsgBox "The ruler guide is now at three inches."
.Item(1).Delete
MsgBox "The ruler guide has been deleted."
End With
End Sub
方法
属性
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈