ParagraphFormat 方法 (Publisher)ParagraphFormat.SetLineSpacing method (Publisher)

设置指定段落的行距。Formats the line spacing of specified paragraphs.

语法Syntax

表达式SetLineSpacing(规则间距)expression.SetLineSpacing (Rule, Spacing)

_表达式_一个代表**ParagraphFormat** 对象的变量。expression A variable that represents a ParagraphFormat object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
RuleRule 必需Required PbLineSpacingRulePbLineSpacingRule 用于指定段落的行距。The line spacing to use for the specified paragraphs. 可以是在 Microsoft 发布服务器类型库中声明的PbLineSpacingRule常量之一。Can be one of the PbLineSpacingRule constants declared in the Microsoft Publisher type library.
SpacingSpacing 可选Optional VariantVariant 指定段落的间距 (以为单位)。The spacing (in points) for the specified paragraphs.

示例Example

以下示例将行距设为双倍行距。This example sets the line spacing to double.

Sub SetLineSpacingForSelection() 
 Selection.TextRange.ParagraphFormat.SetLineSpacing _ 
 Rule:=pbLineSpacingDouble, Spacing:=12 
End Sub

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.