Word.Interfaces.BodyLoadOptions interface

Represents the body of a document or a section.

Remarks

[ API set: WordApi 1.1 ]

Properties

$all

Specifying $all for the LoadOptions loads all the scalar properties (e.g.: Range.address) but not the navigational properties (e.g.: Range.format.fill.color).

font

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

parentBody

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

parentBodyOrNullObject

Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentContentControl

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

parentContentControlOrNullObject

Gets the content control that contains the body. 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.

parentSection

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

parentSectionOrNullObject

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

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.

styleBuiltIn

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

text

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

type

Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordAPIOnline 1.1 and later.

Property Details

$all

Specifying $all for the LoadOptions loads all the scalar properties (e.g.: Range.address) but not the navigational properties (e.g.: Range.format.fill.color).

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

font?: Word.Interfaces.FontLoadOptions;

Property Value

Remarks

[ 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 ItemNotFound error if there isn't a parent body.

parentBody?: Word.Interfaces.BodyLoadOptions;

Property Value

Remarks

[ 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. If there isn't a parent body, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentContentControl

Gets the content control that contains the body. 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 body. 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 ]

parentSection

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

parentSection?: Word.Interfaces.SectionLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentSectionOrNullObject

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

parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

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

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

styleBuiltIn

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

styleBuiltIn?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]

text

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

text?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]

type

Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordAPIOnline 1.1 and later.

type?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]