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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top