FormatParagraph

Syntax

FormatParagraph [.LeftIndent = number or text] [, .RightIndent = number or text] [, .Before = number or text] [, .After = number or text] [, .LineSpacingRule = number] [, .LineSpacing = number or text] [, .Alignment = number] [, .WidowControl = number] [, .KeepWithNext = number] [, .KeepTogether = number] [, .PageBreak = number] [, .NoLineNum = number] [, .DontHyphen = number] [, .Tab = number] [, .FirstIndent = number or text]

Remarks

Applies paragraph formatting to the selected paragraphs. The arguments for the FormatParagraph statement correspond to the options in the Paragraph dialog box (Format menu).

Argument

Explanation

.LeftIndent

The left indent in points or a text measurement

.RightIndent

The right indent in points or a text measurement

.Before

The space before the paragraph in points or a text measurement


Argument

Explanation

.After

The space after the paragraph in points or a text measurement

.LineSpacingRule

The rule used to determine line spacing:

0 (zero) or omitted Single

1 1.5 Lines

2 Double

3 At Least

4 Exactly

5 Multiple

If you specify Single, 1.5 Lines, or Double, and also specify a value for .LineSpacing, the .LineSpacing value takes precedence.

.LineSpacing

The spacing for all lines within the paragraph (used when .LineSpacingRule is At Least, Exactly, or Multiple)

.Alignment

Sets a paragraph alignment:

0 (zero) Left

1 Centered

2 Right

3 Justified

.WidowControl 

If 1, prevents a page break from leaving a single line of the paragraph at the top or bottom of a page (corresponds to selecting the Widow/Orphan Control check box)

.KeepWithNext

If 1, keeps the paragraph on the same page as the paragraph that follows (corresponds to selecting the Keep With Next check box)

.KeepTogether

If 1, keeps all lines in the paragraph on the same page (corresponds to selecting the Keep Lines Together check box)

.PageBreak

If 1, makes the paragraph always appear at the top of a new page (corresponds to selecting the Page Break Before check box)

.NoLineNum

If 1, turns off line numbering for the paragraph (corresponds to selecting the Suppress Line Numbers check box)

.DontHyphen

If 1, excludes the paragraph from automatic hyphenation (corresponds to selecting the Don't Hyphenate check box)

.Tab 

Specifies which tab to select when you display the Paragraph dialog box with a Dialog or Dialog() instruction:

0 (zero) Indents And Spacing tab

1 Text Flow tab

.FirstIndent

The first-line indent in points or a text measurement


Example

This example sets justified alignment and adds 1 inch of space above and below each paragraph in the selection:


FormatParagraph .Alignment = 3, .Before = "1 in", .After = "1 in"

See Also

EditFindPara, EditReplacePara, FormatBordersAndShading, FormatDefineStylePara, FormatStyle, FormatTabs, ParaKeepLinesTogether, ParaKeepWithNext, ParaPageBreakBefore, ParaWidowOrphanControl, Style