Dim objSys as object, objSess as object, objScreen as object
Sub Main
Set objSys = CreateObject("EXTRA.System")
Set objSess = objSys.ActiveSession
Set objScreen = objSess.Screen
sFindWord = "Letter"
For i = 1 to objScreen.Row
For j = 1 to objScreen.Col - Len(sFindWord)
If objScreen.GetString(i, j, Len(sFindWord)) = sFindWord Then
IsFound = True
Exit For
End If
Next
If IsFound Then Exit For
Next
'If you can tab backwards to the start of the field, this should work"
objScreen.MoveTo i, j
objScreen.SendKeys "+{tab}"
'Otherwise you could do something like this:
For j = j - 1 to 1 Step -1
If objScreen.GetString(i, j, 1) <> " " Then Exit For
Next
objScreen.MoveTo i, j + 1
End Sub