Sometimes when configuring functionality that insert or remove content from Word, it is handy to be able to correct the location of the cursor. These commands can be used in conjunction with such functionality and allows us to define the direction and number of characters to move.
Move the cursor either left or right a defined number of places.
<Cmd case="BaseExtensions:move-cursor" direction="X" count="Y"/>
Define which direction the cursor should be moved. This can be either
Define the number of characters to move the cursor. If selection is multiple characters marked, the move will then use one character to 'collapse' to either the end of selection (if direction is set to
Right) or the beginning of selection (if direction is set to
This command expands the current selection. It can be used in conjunction with the above command to more accurately place the cursor in a specific location. For example, using this command to select an entire paragraph, then the
BaseExtensions:move-cursor command to move the cursor one place to the left will ensure the cursor is placed at the beginning of a paragraph.
<Cmd case="BaseExtensions:expand-selection" unit="x"/>
Defines what unit the selection should be expanded to include. This command takes the WdUnits enumerator values as values. More can be read about these here.