BaselineOffset Property

Microsoft PowerPoint Visual Basic

Returns or sets the baseline offset for the specified superscript or subscript characters. Can be a floating-point value from – 1 through 1. A value of – 1 represents an offset of – 100 percent, and a value of 1 represents an offset of 100 percent. Read/write Single.

Remarks

Setting the BaselineOffset property to a negative value automatically sets the Subscript property to True and the Superscript property to False.

Setting the BaselineOffset property to a positive value automatically sets the Subscript property to False and the Superscript property to True.

Setting the Subscript property to True automatically sets the BaselineOffset property to 0.3 (30 percent).

Setting the Superscript property to True automatically sets the BaselineOffset property to – 0.25 ( – 25 percent).

Example

This example sets the text for shape two on slide one and then makes the second character subscript with a 20-percent offset.

With Application.ActivePresentation.Slides(1) _
        .Shapes(2).TextFrame.TextRange
    .Text = "H2O"
    .Characters(2, 1).Font.BaselineOffset = -0.2
End With