RulerLevels2 物件 (Office)RulerLevels2 object (Office)

指定尺規上所有**RulerLevel2** 物件的集合。A collection of all the RulerLevel2 objects on the specified ruler.

註解Remarks

每部 RulerLevel2 物件都代表特定大綱層級之文字的第一行與左邊縮排。Each RulerLevel2 object represents the first-line and left indent for text at a particular outline level. 這個集合一律包含五個成員,一個用於每個可用的大綱層級。This collection always contains five members—one for each of the available outline levels.

範例Example

使用層級屬性可傳回RulerLevels2集合。Use the Levels property to return the RulerLevels2 collection. 下列範例會設定作用中的簡報的本文中的五個大綱層級的邊界。The following example sets the margins for the five outline levels in body text in the active presentation.

With ActivePresentation.SlideMaster.TextStyles(ppBodyStyle).Ruler2 
 .Levels(1).FirstMargin = 0 
 .Levels(1).LeftMargin = 40 
 .Levels(2).FirstMargin = 60 
 .Levels(2).LeftMargin = 100 
 .Levels(3).FirstMargin = 120 
 .Levels(3).LeftMargin = 160 
 .Levels(4).FirstMargin = 180 
 .Levels(4).LeftMargin = 220 
 .Levels(5).FirstMargin = 240 
 .Levels(5).LeftMargin = 280 
End With 

另請參閱See also

支援和意見反應Support and feedback

有關於 Office VBA 或這份文件的問題或意見反應嗎?Have questions or feedback about Office VBA or this documentation? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.