Font.BaselineOffset Property

PowerPoint Developer Reference

Returns or sets the baseline offset for the specified superscript or subscript characters. Read/write.

Syntax

expression.BaselineOffset

expression   A variable that represents a Font object.

Return Value
Single

Remarks

The BaselineOffset property value 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.

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.

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

See Also