Word.Interfaces.ParagraphLoadOptions interface

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

[ API set: WordApi 1.1 ]

Properties

$all
alignment

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

[ API set: WordApi 1.1 ]

firstLineIndent

Gets or sets 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.

[ 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.

[ API set: WordApi 1.1 ]

isLastParagraph

Indicates the paragraph is the last one inside its parent body. Read-only.

[ API set: WordApi 1.3 ]

isListItem

Checks whether the paragraph is a list item. Read-only.

[ API set: WordApi 1.3 ]

leftIndent

Gets or sets the left indent value, in points, for the paragraph.

[ API set: WordApi 1.1 ]

lineSpacing

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

[ API set: WordApi 1.1 ]

lineUnitAfter

Gets or sets the amount of spacing, in grid lines, after the paragraph.

[ API set: WordApi 1.1 ]

lineUnitBefore

Gets or sets the amount of spacing, in grid lines, before the paragraph.

[ API set: WordApi 1.1 ]

list

Gets the List to which this paragraph belongs. Throws an error if the paragraph is not in a list.

[ API set: WordApi 1.3 ]

listItem

Gets the ListItem for the paragraph. Throws an error if the paragraph is not part of a list.

[ API set: WordApi 1.3 ]

listItemOrNullObject

Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list.

[ API set: WordApi 1.3 ]

listOrNullObject

Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list.

[ API set: WordApi 1.3 ]

outlineLevel

Gets or sets the outline level for the paragraph.

[ API set: WordApi 1.1 ]

parentBody

Gets the parent body of the paragraph.

[ API set: WordApi 1.3 ]

parentContentControl

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

[ API set: WordApi 1.1 ]

parentContentControlOrNullObject

Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control.

[ API set: WordApi 1.3 ]

parentTable

Gets the table that contains the paragraph. Throws an error if it is not contained in a table.

[ API set: WordApi 1.3 ]

parentTableCell

Gets the table cell that contains the paragraph. Throws an error if it is not contained in a table cell.

[ API set: WordApi 1.3 ]

parentTableCellOrNullObject

Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell.

[ API set: WordApi 1.3 ]

parentTableOrNullObject

Gets the table that contains the paragraph. Returns a null object if it is not contained in a table.

[ API set: WordApi 1.3 ]

rightIndent

Gets or sets the right indent value, in points, for the paragraph.

[ API set: WordApi 1.1 ]

spaceAfter

Gets or sets the spacing, in points, after the paragraph.

[ API set: WordApi 1.1 ]

spaceBefore

Gets or sets the spacing, in points, before the paragraph.

[ API set: WordApi 1.1 ]

style

Gets or sets 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.

[ API set: WordApi 1.1 ]

styleBuiltIn

Gets or sets 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.

[ API set: WordApi 1.3 ]

tableNestingLevel

Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only.

[ API set: WordApi 1.3 ]

text

Gets the text of the paragraph. Read-only.

[ API set: WordApi 1.1 ]

Property Details

$all

$all?: boolean;

Property Value

boolean

alignment

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

[ API set: WordApi 1.1 ]

alignment?: boolean;

Property Value

boolean

firstLineIndent

Gets or sets 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.

[ API set: WordApi 1.1 ]

firstLineIndent?: boolean;

Property Value

boolean

font

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

[ API set: WordApi 1.1 ]

font?: Word.Interfaces.FontLoadOptions;

Property Value

isLastParagraph

Indicates the paragraph is the last one inside its parent body. Read-only.

[ API set: WordApi 1.3 ]

isLastParagraph?: boolean;

Property Value

boolean

isListItem

Checks whether the paragraph is a list item. Read-only.

[ API set: WordApi 1.3 ]

isListItem?: boolean;

Property Value

boolean

leftIndent

Gets or sets the left indent value, in points, for the paragraph.

[ API set: WordApi 1.1 ]

leftIndent?: boolean;

Property Value

boolean

lineSpacing

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

[ API set: WordApi 1.1 ]

lineSpacing?: boolean;

Property Value

boolean

lineUnitAfter

Gets or sets the amount of spacing, in grid lines, after the paragraph.

[ API set: WordApi 1.1 ]

lineUnitAfter?: boolean;

Property Value

boolean

lineUnitBefore

Gets or sets the amount of spacing, in grid lines, before the paragraph.

[ API set: WordApi 1.1 ]

lineUnitBefore?: boolean;

Property Value

boolean

list

Gets the List to which this paragraph belongs. Throws an error if the paragraph is not in a list.

[ API set: WordApi 1.3 ]

list?: Word.Interfaces.ListLoadOptions;

Property Value

listItem

Gets the ListItem for the paragraph. Throws an error if the paragraph is not part of a list.

[ API set: WordApi 1.3 ]

listItem?: Word.Interfaces.ListItemLoadOptions;

Property Value

listItemOrNullObject

Gets the ListItem for the paragraph. Returns a null object if the paragraph is not part of a list.

[ API set: WordApi 1.3 ]

listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions;

Property Value

listOrNullObject

Gets the List to which this paragraph belongs. Returns a null object if the paragraph is not in a list.

[ API set: WordApi 1.3 ]

listOrNullObject?: Word.Interfaces.ListLoadOptions;

Property Value

outlineLevel

Gets or sets the outline level for the paragraph.

[ API set: WordApi 1.1 ]

outlineLevel?: boolean;

Property Value

boolean

parentBody

Gets the parent body of the paragraph.

[ API set: WordApi 1.3 ]

parentBody?: Word.Interfaces.BodyLoadOptions;

Property Value

parentContentControl

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

[ API set: WordApi 1.1 ]

parentContentControl?: Word.Interfaces.ContentControlLoadOptions;

Property Value

parentContentControlOrNullObject

Gets the content control that contains the paragraph. Returns a null object if there isn't a parent content control.

[ API set: WordApi 1.3 ]

parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;

Property Value

parentTable

Gets the table that contains the paragraph. Throws an error if it is not contained in a table.

[ API set: WordApi 1.3 ]

parentTable?: Word.Interfaces.TableLoadOptions;

Property Value

parentTableCell

Gets the table cell that contains the paragraph. Throws an error if it is not contained in a table cell.

[ API set: WordApi 1.3 ]

parentTableCell?: Word.Interfaces.TableCellLoadOptions;

Property Value

parentTableCellOrNullObject

Gets the table cell that contains the paragraph. Returns a null object if it is not contained in a table cell.

[ API set: WordApi 1.3 ]

parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;

Property Value

parentTableOrNullObject

Gets the table that contains the paragraph. Returns a null object if it is not contained in a table.

[ API set: WordApi 1.3 ]

parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;

Property Value

rightIndent

Gets or sets the right indent value, in points, for the paragraph.

[ API set: WordApi 1.1 ]

rightIndent?: boolean;

Property Value

boolean

spaceAfter

Gets or sets the spacing, in points, after the paragraph.

[ API set: WordApi 1.1 ]

spaceAfter?: boolean;

Property Value

boolean

spaceBefore

Gets or sets the spacing, in points, before the paragraph.

[ API set: WordApi 1.1 ]

spaceBefore?: boolean;

Property Value

boolean

style

Gets or sets 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.

[ API set: WordApi 1.1 ]

style?: boolean;

Property Value

boolean

styleBuiltIn

Gets or sets 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.

[ API set: WordApi 1.3 ]

styleBuiltIn?: boolean;

Property Value

boolean

tableNestingLevel

Gets the level of the paragraph's table. It returns 0 if the paragraph is not in a table. Read-only.

[ API set: WordApi 1.3 ]

tableNestingLevel?: boolean;

Property Value

boolean

text

Gets the text of the paragraph. Read-only.

[ API set: WordApi 1.1 ]

text?: boolean;

Property Value

boolean