Word.Interfaces.BodyLoadOptions interface
Represents the body of a document or a section.
Remarks
Properties
$all | Specifying |
font | Gets the text format of the body. Use this to get and set font name, size, color and other properties. |
parent |
Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an |
parent |
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 |
parent |
Gets the content control that contains the body. Throws an |
parent |
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 |
parent |
Gets the parent section of the body. Throws an |
parent |
Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its |
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 |
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 load options loads all the scalar properties (such as Range.address
) but not the navigational properties (such as 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
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
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
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
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
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
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
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
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
text
Gets the text of the body. Use the insertText method to insert text.
text?: boolean;
Property Value
boolean
Remarks
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
Office Add-ins