Table of contents
TOC
Collapse the table of content
Expand the table of content

Font.BaselineOffset Property (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

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.

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

See also

Concepts

Font Object

© 2018 Microsoft