Edit

Share via


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

bold

Specifies whether the range is formatted as bold.

boldBidirectional

Specifies whether the range is formatted as bold in a right-to-left language document.

case

Specifies a CharacterCase value that represents the case of the text in the range.

characterWidth

Specifies the character width of the range.

combineCharacters

Specifies if the range contains combined characters.

disableCharacterSpaceGrid

Specifies if Microsoft Word ignores the number of characters per line for the corresponding Range object.

emphasisMark

Specifies the emphasis mark for a character or designated character string.

end

Specifies the ending character position of the range.

fitTextWidth

Specifies the width (in the current measurement units) in which Microsoft Word fits the text in the current selection or range.

font

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

grammarChecked

Specifies if a grammar check has been run on the range or document.

hasNoProofing

Specifies the proofing status (spelling and grammar checking) of the range.

highlightColorIndex

Specifies the highlight color for the range.

horizontalInVertical

Specifies the formatting for horizontal text set within vertical text.

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.

id

Specifies the ID for the range.

isEmpty

Checks whether the range length is zero.

isEndOfRowMark

Gets if the range is collapsed and is located at the end-of-row mark in a table.

isTextVisibleOnScreen

Gets whether the text in the range is visible on the screen.

italic

Specifies if the font or range is formatted as italic.

italicBidirectional

Specifies if the font or range is formatted as italic (right-to-left languages).

kana

Specifies whether the range of Japanese language text is hiragana or katakana.

languageDetected

Specifies whether Microsoft Word has detected the language of the text in the range.

languageId

Specifies a LanguageId value that represents the language for the range.

languageIdFarEast

Specifies an East Asian language for the range.

languageIdOther

Specifies a language for the range that isn't classified as an East Asian language.

listFormat

Returns a ListFormat object that represents all the list formatting characteristics of the range.

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.

shading

Returns a ShadingUniversal object that refers to the shading formatting for the range.

showAll

Specifies if all nonprinting characters (such as hidden text, tab marks, space marks, and paragraph marks) are displayed.

spellingChecked

Specifies if spelling has been checked throughout the range or document.

start

Specifies the starting character position of the range.

storyLength

Gets the number of characters in the story that contains the range.

storyType

Gets the story type for the range.

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.

twoLinesInOne

Specifies whether Microsoft Word sets two lines of text in one and specifies the characters that enclose the text, if any.

underline

Specifies the type of underline applied to 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

bold

Specifies whether the range is formatted as bold.

bold?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

boldBidirectional

Specifies whether the range is formatted as bold in a right-to-left language document.

boldBidirectional?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

case

Specifies a CharacterCase value that represents the case of the text in the range.

case?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

characterWidth

Specifies the character width of the range.

characterWidth?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

combineCharacters

Specifies if the range contains combined characters.

combineCharacters?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

disableCharacterSpaceGrid

Specifies if Microsoft Word ignores the number of characters per line for the corresponding Range object.

disableCharacterSpaceGrid?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

emphasisMark

Specifies the emphasis mark for a character or designated character string.

emphasisMark?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

end

Specifies the ending character position of the range.

end?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

fitTextWidth

Specifies the width (in the current measurement units) in which Microsoft Word fits the text in the current selection or range.

fitTextWidth?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

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 ]

grammarChecked

Specifies if a grammar check has been run on the range or document.

grammarChecked?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

hasNoProofing

Specifies the proofing status (spelling and grammar checking) of the range.

hasNoProofing?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

highlightColorIndex

Specifies the highlight color for the range.

highlightColorIndex?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

horizontalInVertical

Specifies the formatting for horizontal text set within vertical text.

horizontalInVertical?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

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 ]

id

Specifies the ID for the range.

id?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

isEmpty

Checks whether the range length is zero.

isEmpty?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi 1.3 ]

isEndOfRowMark

Gets if the range is collapsed and is located at the end-of-row mark in a table.

isEndOfRowMark?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

isTextVisibleOnScreen

Gets whether the text in the range is visible on the screen.

isTextVisibleOnScreen?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

italic

Specifies if the font or range is formatted as italic.

italic?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

italicBidirectional

Specifies if the font or range is formatted as italic (right-to-left languages).

italicBidirectional?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

kana

Specifies whether the range of Japanese language text is hiragana or katakana.

kana?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

languageDetected

Specifies whether Microsoft Word has detected the language of the text in the range.

languageDetected?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

languageId

Specifies a LanguageId value that represents the language for the range.

languageId?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

languageIdFarEast

Specifies an East Asian language for the range.

languageIdFarEast?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

languageIdOther

Specifies a language for the range that isn't classified as an East Asian language.

languageIdOther?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.3 ]

listFormat

Returns a ListFormat object that represents all the list formatting characteristics of the range.

listFormat?: Word.Interfaces.ListFormatLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 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 ]

shading

Returns a ShadingUniversal object that refers to the shading formatting for the range.

shading?: Word.Interfaces.ShadingUniversalLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.3 ]

showAll

Specifies if all nonprinting characters (such as hidden text, tab marks, space marks, and paragraph marks) are displayed.

showAll?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

spellingChecked

Specifies if spelling has been checked throughout the range or document.

spellingChecked?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

start

Specifies the starting character position of the range.

start?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

storyLength

Gets the number of characters in the story that contains the range.

storyLength?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

storyType

Gets the story type for the range.

storyType?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

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 ]

twoLinesInOne

Specifies whether Microsoft Word sets two lines of text in one and specifies the characters that enclose the text, if any.

twoLinesInOne?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.4 ]

underline

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Specifies the type of underline applied to the range.

underline?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]