Am I at the end of the document

  • Thread starter Southern at Heart
  • Start date
S

Southern at Heart

In my code I have:
Selection.EndKey unit:=wdLine
....this puts me at the end of that line. It's there a way to tell if that
is the last line in the document?
thanks.
 
G

Greg Maxey

Sub Test()
Selection.EndKey unit:=wdLine
If Selection.Range.End + 1 = ActiveDocument.Range.End Then MsgBox "At end"
End Sub
 
Top