ParagraphFormat.LineRuleBefore 属性 (PowerPoint)

确定是否将每段首行前面的行距设为特定的磅数或行数。 读/写。

语法

expressionLineRuleBefore

表达 一个代表 ParagraphFormat 对象的变量。

返回值

MsoTriState

备注

LineRuleBefore 属性的值可以是其中一个 MsoTriState 常量。

常量 说明
msoFalse 将每段首行前面的行距设为特定的磅数。
msoTrue 将每段首行前面的行距设为特定的行数。

示例

本示例显示一个消息框,其中显示当前演示文稿第一张幻灯片第二个形状中文本段落前的间距设置。

With Application.ActivePresentation.Slides(1).Shapes(2).TextFrame

    With .TextRange.ParagraphFormat

        sb = .SpaceBefore

        If .LineRuleBefore Then

            sbUnits = " lines"

        Else

            sbUnits = " points"

        End If

    End With

End With

MsgBox "Current spacing before paragraphs: " & sb & sbUnits

另请参阅

ParagraphFormat 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。