Word.SelectionMoveOptions 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 the options for the Selection.move method.
Remarks
Properties
count | If provided, specifies the number of units by which the range or selection is to be moved. If |
unit | If provided, specifies the unit by which to move the ending character position. The default value is |
Property Details
count
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.
If provided, specifies the number of units by which the range or selection is to be moved. If count
is a positive number, the object is collapsed to its end position and moved backward in the document by the specified number of units. If count
is a negative number, the object is collapsed to its start position and moved forward by the specified number of units. The default value is 1. You can also control the collapse direction by using the Selection.collapse method before using the move
method. If the range or selection is in the middle of a unit or isn't collapsed, moving it to the beginning or end of the unit counts as moving it one full unit.
count?: number;
Property Value
number
Remarks
unit
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.
If provided, specifies the unit by which to move the ending character position. The default value is character
.
unit?: Word.OperationUnit | "Character" | "Word" | "Sentence" | "Paragraph" | "Line" | "Story" | "Screen" | "Section" | "Column" | "Row" | "Window" | "Cell" | "CharacterFormat" | "ParagraphFormat" | "Table" | "Item";
Property Value
Word.OperationUnit | "Character" | "Word" | "Sentence" | "Paragraph" | "Line" | "Story" | "Screen" | "Section" | "Column" | "Row" | "Window" | "Cell" | "CharacterFormat" | "ParagraphFormat" | "Table" | "Item"