Edit

Share via


Word.Interfaces.SelectionLoadOptions interface

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.

Represents a selected range or the insertion point in a Word document.

  • Note: Range objects share many of the same methods and properties as Selection objects. Using Range objects is preferable for manipulating a document when there isn't a reason to physically change the current selection.

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

end

Specifies the ending character position of the selection.

fitTextWidth

Specifies the width in which Word fits the text in the current selection.

font

Returns the Font object that represents the character formatting of the selection.

formattedText

Specifies a Range object that includes the formatted text in the range or selection.

hasNoProofing

Returns whether the spelling and grammar checker ignores the selected text. If the selected text contains a mix of proofed and un-proofed content, this API returns null.

isActive

Returns whether the selection in the specified window or pane is active.

isColumnSelectModeActive

Specifies whether column selection mode is active.

isEndOfRowMark

Returns whether the selection is at the end-of-row mark in a table.

isExtendModeActive

Specifies whether Extend mode is active.

isInsertionPointAtEndOfLine

Returns whether the insertion point is at the end of a line.

isStartActive

Specifies whether the beginning of the selection is active.

languageDetected

Specifies whether Word has detected the language of the selected text.

languageId

Returns the language for the selection.

languageIdFarEast

Returns the East Asian language for the selection.

languageIdOther

Returns the language for the selection that isn't classified as an East Asian language.

orientation

Specifies the orientation of text in the selection.

range

Returns the Range object for the portion of the document contained in the selection.

shading

Returns the ShadingUniversal object for the shading formatting for the selection.

start

Specifies the starting character position of the selection.

storyLength

Returns the number of characters in the story that contains the selection.

storyType

Returns the story type for the selection.

text

Specifies the text in the selection.

type

Returns the selection type.

Property Details

$all

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.

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

end

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 ending character position of the selection.

end?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

fitTextWidth

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 width in which Word fits the text in the current selection.

fitTextWidth?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

font

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.

Returns the Font object that represents the character formatting of the selection.

font?: Word.Interfaces.FontLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

formattedText

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 a Range object that includes the formatted text in the range or selection.

formattedText?: Word.Interfaces.RangeLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

hasNoProofing

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.

Returns whether the spelling and grammar checker ignores the selected text. If the selected text contains a mix of proofed and un-proofed content, this API returns null.

hasNoProofing?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

isActive

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.

Returns whether the selection in the specified window or pane is active.

isActive?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

isColumnSelectModeActive

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 whether column selection mode is active.

isColumnSelectModeActive?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

isEndOfRowMark

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.

Returns whether the selection is at the end-of-row mark in a table.

isEndOfRowMark?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

isExtendModeActive

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 whether Extend mode is active.

isExtendModeActive?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

isInsertionPointAtEndOfLine

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.

Returns whether the insertion point is at the end of a line.

isInsertionPointAtEndOfLine?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

isStartActive

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 whether the beginning of the selection is active.

isStartActive?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

languageDetected

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 whether Word has detected the language of the selected text.

languageDetected?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

languageId

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.

Returns the language for the selection.

languageId?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

languageIdFarEast

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.

Returns the East Asian language for the selection.

languageIdFarEast?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

languageIdOther

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.

Returns the language for the selection that isn't classified as an East Asian language.

languageIdOther?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

orientation

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 orientation of text in the selection.

orientation?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

range

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.

Returns the Range object for the portion of the document contained in the selection.

range?: Word.Interfaces.RangeLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

shading

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.

Returns the ShadingUniversal object for the shading formatting for the selection.

shading?: Word.Interfaces.ShadingUniversalLoadOptions;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

start

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 starting character position of the selection.

start?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

storyLength

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.

Returns the number of characters in the story that contains the selection.

storyLength?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

storyType

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.

Returns the story type for the selection.

storyType?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

text

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 text in the selection.

text?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

type

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.

Returns the selection type.

type?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]