Class RulerLevel (PowerPoint VBA)

Contains first-line indent and hanging indent information for an outline level.

Set

To use a RulerLevel class variable it first needs to be instantiated, for example

Dim rll as RulerLevel
Set rll = ActiveWindow.RangeFromPoint.TextFrame.Ruler.Levels(Index:=1)

The following procedures can be used to set variables of type RulerLevel: RulerLevels.Item and Ruler.Levels

FirstMargin

Returns or sets the first-line indent for the specified outline level, in points.

If a paragraph begins with a bullet, the bullet position is determined by the FirstMargin property, and the position of the first text character in the paragraph is determined by the LeftMargin property.

ActivePresentation.Slides(1).Shapes(1).TextFrame.Ruler.Levels(1).FirstMargin = 9

LeftMargin

Returns or sets the left indent for the specified outline level, in points.

If a paragraph begins with a bullet, the bullet position is determined by the FirstMargin property, and the position of the first text character in the paragraph is determined by the LeftMargin property.

ActivePresentation.Slides(1).Shapes(1).TextFrame.Ruler.Levels(1).LeftMargin = 54

Parent

Returns the parent object for the specified object.

RulerLevels.Count

Returns the number of objects in the specified collection.

Dim lngCount As Long
lngCount = ActiveWindow.RangeFromPoint.TextFrame.Ruler.Levels.Count

RulerLevels.Item

Returns a single RulerLevel object from the specified RulerLevels collection.

Syntax : expression.Item (Index)

Index: The index number of the single RulerLevel object in the collection to be returned.

Dim rll As RulerLevel
Set rll = ActivePresentation.Slides(1).Shapes(1).TextFrame.Ruler.Levels(Index:=1)

RulerLevels.Parent

Returns the parent object for the specified object.