共用方式為


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 支援與意見反應