Word.Interfaces.ParagraphData interface

An interface describing the data returned by calling "paragraph.toJSON()".

Properties

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. Read-only.

[ API set: WordApi 1.1 ]

inlinePictures

Gets the collection of InlinePicture objects in the paragraph. The collection does not include floating images. Read-only.

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

listItem

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

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

[ API set: WordApi 1.3 ]

outlineLevel

Gets or sets the outline level for the paragraph.

[ API set: WordApi 1.1 ]

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

alignment

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

[ API set: WordApi 1.1 ]

alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified";

Property Value

Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"

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?: number;

Property Value

number

font

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

[ API set: WordApi 1.1 ]

font?: Word.Interfaces.FontData;

Property Value

inlinePictures

Gets the collection of InlinePicture objects in the paragraph. The collection does not include floating images. Read-only.

[ API set: WordApi 1.1 ]

inlinePictures?: Word.Interfaces.InlinePictureData[];

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?: number;

Property Value

number

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?: number;

Property Value

number

lineUnitAfter

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

[ API set: WordApi 1.1 ]

lineUnitAfter?: number;

Property Value

number

lineUnitBefore

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

[ API set: WordApi 1.1 ]

lineUnitBefore?: number;

Property Value

number

listItem

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

[ API set: WordApi 1.3 ]

listItem?: Word.Interfaces.ListItemData;

Property Value

listItemOrNullObject

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

[ API set: WordApi 1.3 ]

listItemOrNullObject?: Word.Interfaces.ListItemData;

Property Value

outlineLevel

Gets or sets the outline level for the paragraph.

[ API set: WordApi 1.1 ]

outlineLevel?: number;

Property Value

number

rightIndent

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

[ API set: WordApi 1.1 ]

rightIndent?: number;

Property Value

number

spaceAfter

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

[ API set: WordApi 1.1 ]

spaceAfter?: number;

Property Value

number

spaceBefore

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

[ API set: WordApi 1.1 ]

spaceBefore?: number;

Property Value

number

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?: string;

Property Value

string

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?: Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6";

Property Value

Word.Style | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"

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?: number;

Property Value

number

text

Gets the text of the paragraph. Read-only.

[ API set: WordApi 1.1 ]

text?: string;

Property Value

string