How to I check for the End of File?

A

Adam.Effinger

I have been working to figure out this one, but I can't get to the end
of file, it keeps saying that the object doesn't exist in the collection
(Refering to the table(i+1) where i is the last table, but I can't do on
error checks... I'm not sure why, but it seems that what ever I try to
do it doesn't work. Some help would be great!
 
S

Stefan Blom

If you are trying to access the last table in a document, you can use:

Dim t As Table
Set t = ActiveDocument.Tables(ActiveDocument.Tables.Count)
'More code follows...
 
A

Adam.Effinger

Thank you very much. I have to go to a meeting here in a bit, but I'l
try it soon.
 

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