Set Cursor position to right after selection in word VBA

52 Views Asked by At

I have code that creates fields on a word document based on selection, but when it is done it has the field selected. I want to select the position right after the field. So if there is a FIELD_ with _ being the position right after the field, it is what I want to select.

I found this:

Dim newSelect As Long: newSelect = Selection.End + 1

to get the Character position but then how do I select based on character position? Or is there another method to acheive this?

1

There are 1 best solutions below

0
taller On BEST ANSWER

Pls try.

Selection.Collapse Word.wdCollapseEnd

Microsoft documentation:

Selection.Collapse method (Word)

enter image description here