I'm not sure if this is the exact logic you need but this code presenting one of possible way of checking if you are in last line of document.
Sub Highlight_Next_Row_Down()
Selection.EndKey Unit:=wdLine
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
'here check if this is the end
If Selection.End = ActiveDocument.Bookmarks("\EndOfDoc").Range.End Then
'just unhighlight
Selection.Range.HighlightColorIndex = wdNoHighlight
Else
'your code here
Selection.Range.HighlightColorIndex = wdNoHighlight
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.EndKey Unit:=wdLine
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Range.HighlightColorIndex = wdYellow
End If
End Sub
Please keep in mind that any additional empty paragraph moves end of document
somewhere below your the last line of your TEXT.