Jennifer
Your code has some unclear bits in it. If you know that the table is always the third one then you simply use that number rather than creating a variable for it.
The following declaration line is probably not giving you what you expect.
Dim vFlag, dummy, xx, yy, zz As Integer
This is a trap for young players but this declares zz as an Integer whilst all the others are of variant type. This matters a lot because the two lines listed in Graham's post assign yy to different things
yy = ActiveDocument.Tables.Count 'this is an integer
yy = ActiveDocument.Tables(1) 'this is a table
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|