Word.Interfaces.RangeLoadOptions interface

Represents a contiguous area in a document.

Remarks

[ API set: WordApi 1.1 ]

Properties

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

font

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

hyperlink

Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part.

isEmpty

Checks whether the range length is zero.

parentBody

Gets the parent body of the range.

parentContentControl

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

parentContentControlOrNullObject

Gets the currently supported content control that contains the range. 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.

parentTable

Gets the table that contains the range. Throws an ItemNotFound error if it isn't contained in a table.

parentTableCell

Gets the table cell that contains the range. Throws an ItemNotFound error if it isn't contained in a table cell.

parentTableCellOrNullObject

Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableOrNullObject

Gets the table that contains the range. If it isn't contained in a table, 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 range. 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 range. 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 range.

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 range. 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 ]

Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part.

hyperlink?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]

isEmpty

Checks whether the range length is zero.

isEmpty?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]

parentBody

Gets the parent body of the range.

parentBody?: Word.Interfaces.BodyLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentContentControl

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

parentTable

Gets the table that contains the range. Throws an ItemNotFound error if it isn't contained in a table.

parentTable?: Word.Interfaces.TableLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTableCell

Gets the table cell that contains the range. Throws an ItemNotFound error if it isn't contained in a table cell.

parentTableCell?: Word.Interfaces.TableCellLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTableCellOrNullObject

Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

parentTableOrNullObject

Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its isNullObject property set to true. For further information, see *OrNullObject methods and properties.

parentTableOrNullObject?: Word.Interfaces.TableLoadOptions;

Property Value

Remarks

[ API set: WordApi 1.3 ]

style

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

text?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.1 ]