Word.Interfaces.BodyLoadOptions interface

Represents the body of a document or a section.

[ API set: WordApi 1.1 ]

Properties

$all
font

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

[ API set: WordApi 1.1 ]

parentBody

Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an error if there isn't a parent body.

[ API set: WordApi 1.3 ]

parentBodyOrNullObject

Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body.

[ API set: WordApi 1.3 ]

parentContentControl

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

[ API set: WordApi 1.1 ]

parentContentControlOrNullObject

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

[ API set: WordApi 1.3 ]

parentSection

Gets the parent section of the body. Throws an error if there isn't a parent section.

[ API set: WordApi 1.3 ]

parentSectionOrNullObject

Gets the parent section of the body. Returns a null object if there isn't a parent section.

[ API set: WordApi 1.3 ]

style

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

[ API set: WordApi 1.1 ]

styleBuiltIn

Gets or sets the built-in style name for the body. 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 ]

text

Gets the text of the body. Use the insertText method to insert text. Read-only.

[ API set: WordApi 1.1 ]

type

Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only.

[ API set: WordApi 1.3 ]

Property Details

$all

$all?: boolean;

Property Value

boolean

font

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

[ API set: WordApi 1.1 ]

font?: Word.Interfaces.FontLoadOptions;

Property Value

parentBody

Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an error if there isn't a parent body.

[ API set: WordApi 1.3 ]

parentBody?: Word.Interfaces.BodyLoadOptions;

Property Value

parentBodyOrNullObject

Gets the parent body of the body. For example, a table cell body's parent body could be a header. Returns a null object if there isn't a parent body.

[ API set: WordApi 1.3 ]

parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions;

Property Value

parentContentControl

Gets the content control that contains the body. 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 body. Returns a null object if there isn't a parent content control.

[ API set: WordApi 1.3 ]

parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions;

Property Value

parentSection

Gets the parent section of the body. Throws an error if there isn't a parent section.

[ API set: WordApi 1.3 ]

parentSection?: Word.Interfaces.SectionLoadOptions;

Property Value

parentSectionOrNullObject

Gets the parent section of the body. Returns a null object if there isn't a parent section.

[ API set: WordApi 1.3 ]

parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions;

Property Value

style

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

[ API set: WordApi 1.1 ]

style?: boolean;

Property Value

boolean

styleBuiltIn

Gets or sets the built-in style name for the body. 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

text

Gets the text of the body. Use the insertText method to insert text. Read-only.

[ API set: WordApi 1.1 ]

text?: boolean;

Property Value

boolean

type

Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Read-only.

[ API set: WordApi 1.3 ]

type?: boolean;

Property Value

boolean