MoveWhile Method Example

This example moves the selection after consecutive tabs.

Selection.MoveWhile Cset:=vbTab, Count:=wdForward

This example moves aRange while any of the following (uppercase or lowercase) letters are found: "a", "t", or "i".

Set aRange = ActiveDocument.Characters(1)
aRange.MoveWhile Cset:="atiATI", Count:=wdForward