Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check if I am at the end of a document...

Status
Not open for further replies.

nesplb

Programmer
Jul 29, 2003
109
NO
Hi!

This is perhaps a stupid question, but I wonder if there's a way to check if I am at the end of the document? I thought EOF would work, but it didn't work for me...

I was thinking of somthing like this:
Code:
While Not Selection.Style = &quot;someStyleName&quot; or not <endofdocument>
Selection.MoveDown Unit:=wdParagraph, Count:=1, Extend:=wdMove
Wend



Pål Nesteby

PDC-Tangen
Norway
 
Hi Pål,

Not too difficult really; try ..

Code:
While Not Selection.End = ActiveDocument.Range.End

Enjoy,
Tony
 
thanks!

Pål Nesteby

PDC-Tangen
Norway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top