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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if doc = view.getlastdocument then... 1

Status
Not open for further replies.

IG3Rosen

IS-IT--Management
Jan 5, 2005
40
FR
Hi ! This doesn't work !!
I'm trying to check if the document selected with
set doc = view.getnextdocument is the last document in the view, so i though that this code should work

" if doc = view.getlastdocument " but ... no

So I do it this way :

set doc2 = view.getlastdocument
if doc.UniversalID = doc2.UniuversalID then...

But is that a good way to di this ?

Thank


 
If it is the last doc in the view, then the method GetNextDocument should return null.

I would do the test like this :
Code:
doc = view.getlastdocument
doc2 = view.getnextdocument(doc)
if doc2 is nothing then

end if

Of course, if it's not, you need to continue cycling until it is.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top