Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Am I at the end of the document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Southern at Heart - 06 Jan 2008 02:26 GMT
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.
Greg Maxey - 06 Jan 2008 02:45 GMT
Sub Test()
Selection.EndKey unit:=wdLine
If Selection.Range.End + 1 = ActiveDocument.Range.End Then MsgBox "At end"
End Sub

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.