SetLineSpacing Method

Microsoft Publisher Visual Basic

expression.SetLineSpacing(Rule, Spacing)

expression    Required. An expression that returns a ParagraphFormat object.

Rule   Required PbLineSpacingRule. The line spacing to use for the specified paragraphs.

PbLineSpacingRule can be one of these PbLineSpacingRule constants.
pbLineSpacing1pt5 Sets the spacing for specified paragraphs to one-and-a-half lines.
pbLineSpacingDouble Double-spaces the specified paragraphs.
pbLineSpacingExactly Sets the line spacing to exactly the value specified in the Spacing argument, even if a larger font is used within the paragraph.
pbLineSpacingMixed A return value for the LineSpacing property that indicates that line spacing is a combination of values for the specified paragraphs.
pbLineSpacingMultiple Sets the line spacing to the value specified in the Spacing argument.
pbLineSpacingSingle Single spaces the specified paragraphs.

Spacing   Required Variant. 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