MoveUntil Method Example

This example moves myRange forward through the next 100 characters in the document until the character "t" is found.

Set myRange = ActiveDocument.Words(1)
myRange.MoveUntil Cset:="t", Count:=100

This example moves the selection forward to the end of the active paragraph and then displays the number of characters by which the selection was moved.

x = Selection.MoveUntil(Cset:=Chr$(13), Count:=wdForward)
MsgBox x-1 & " character positions were moved"