Word.Interfaces.ParagraphLoadOptions interface

Represents a single paragraph in a selection, range, content control, or document body.

Remarks

[ API set: WordApi 1.1 ]

Properties

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

alignment

Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'.

firstLineIndent

Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent.

font

Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties.

isLastParagraph

Indicates the paragraph is the last one inside its parent body.

isListItem

Checks whether the paragraph is a list item.

leftIndent

Specifies the left indent value, in points, for the paragraph.

lineSpacing

Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12.

lineUnitAfter

Specifies the amount of spacing, in grid lines, after the paragraph.

lineUnitBefore

Specifies the amount of spacing, in grid lines, before the paragraph.

list

Gets the List to which this paragraph belongs. Throws an ItemNotFound error if the paragraph isn't in a list.

listItem

Gets the ListItem for the paragraph. Throws an ItemNotFound error if the paragraph isn't part of a list.

listItemOrNullObject

Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

listOrNullObject

Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

outlineLevel

Specifies the outline level for the paragraph.

parentBody

Gets the parent body of the paragraph.

parentContentControl

Gets the content control that contains the paragraph. Throws an ItemNotFound error if there isn't a parent content control.

parentContentControlOrNullObject

Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTable

Gets the table that contains the paragraph. Throws an ItemNotFound error if it isn't contained in a table.

parentTableCell

Gets the table cell that contains the paragraph. Throws an ItemNotFound error if it isn't contained in a table cell.

parentTableCellOrNullObject

Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableOrNullObject

Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

rightIndent

Specifies the right indent value, in points, for the paragraph.

spaceAfter

Specifies the spacing, in points, after the paragraph.

spaceBefore

Specifies the spacing, in points, before the paragraph.

style

Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property.

styleBuiltIn

Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property.

tableNestingLevel

Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table.

text

Gets the text of the paragraph.

Property Details

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

$all?: boolean;

Property Value

boolean

alignment

Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'.

alignment?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

firstLineIndent

Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent.

firstLineIndent?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

font

Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties.

font?: Word.Interfaces.FontLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.1 ]

isLastParagraph

Indicates the paragraph is the last one inside its parent body.

isLastParagraph?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]

isListItem

Checks whether the paragraph is a list item.

isListItem?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]

leftIndent

Specifies the left indent value, in points, for the paragraph.

leftIndent?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

lineSpacing

Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12.

lineSpacing?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

lineUnitAfter

Specifies the amount of spacing, in grid lines, after the paragraph.

lineUnitAfter?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

lineUnitBefore

Specifies the amount of spacing, in grid lines, before the paragraph.

lineUnitBefore?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

list

Gets the List to which this paragraph belongs. Throws an ItemNotFound error if the paragraph isn't in a list.

list?: Word.Interfaces.ListLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

listItem

Gets the ListItem for the paragraph. Throws an ItemNotFound error if the paragraph isn't part of a list.

listItem?: Word.Interfaces.ListItemLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

listItemOrNullObject

Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

listOrNullObject

Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

listOrNullObject?: Word.Interfaces.ListLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

outlineLevel

Specifies the outline level for the paragraph.

outlineLevel?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

parentBody

Gets the parent body of the paragraph.

parentBody?: Word.Interfaces.BodyLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentContentControl

Gets the content control that contains the paragraph. Throws an ItemNotFound error if there isn't a parent content control.

parentContentControl?: Word.Interfaces.ContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.1 ]

parentContentControlOrNullObject

Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTable

Gets the table that contains the paragraph. Throws an ItemNotFound error if it isn't contained in a table.

parentTable?: Word.Interfaces.TableLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTableCell

Gets the table cell that contains the paragraph. Throws an ItemNotFound error if it isn't contained in a table cell.

parentTableCell?: Word.Interfaces.TableCellLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTableCellOrNullObject

Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTableOrNullObject

Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

rightIndent

Specifies the right indent value, in points, for the paragraph.

rightIndent?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

spaceAfter

Specifies the spacing, in points, after the paragraph.

spaceAfter?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

spaceBefore

Specifies the spacing, in points, before the paragraph.

spaceBefore?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

style

Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property.

style?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

styleBuiltIn

Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property.

styleBuiltIn?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]

tableNestingLevel

Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table.

tableNestingLevel?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]

text

Gets the text of the paragraph.

text?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]