Word.Interfaces.BodyData interface

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

Properties

contentControls

Gets the collection of rich text content control objects in the body.

font

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

inlinePictures

Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images.

paragraphs

Gets the collection of paragraph objects in the body.

style

Specifies the style name for the body. 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.

text

Gets the text of the body. Use the insertText method to insert text.

Property Details

contentControls

Gets the collection of rich text content control objects in the body.

contentControls?: Word.Interfaces.ContentControlData[];

Property Value

Remarks

[ API set: WordApi 1.1 ]

font

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

font?: Word.Interfaces.FontData;

Property Value

Remarks

[ API set: WordApi 1.1 ]

inlinePictures

Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images.

inlinePictures?: Word.Interfaces.InlinePictureData[];

Property Value

Remarks

[ API set: WordApi 1.1 ]

paragraphs

Gets the collection of paragraph objects in the body.

paragraphs?: Word.Interfaces.ParagraphData[];

Property Value

Remarks

[ API set: WordApi 1.1 ]

Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned.

style

Specifies the style name for the body. 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?: string;

Property Value

string

Remarks

[ API set: WordApi 1.1 ]

text

Gets the text of the body. Use the insertText method to insert text.

text?: string;

Property Value

string

Remarks

[ API set: WordApi 1.1 ]