The table count can be obtained with:
ActiveDocument.Tables.Count
A loop in VBA might be constructed with code like:
Code:
Sub Demo1()
Dim i As along
With ActiveDocument
For i = 1 To .Tables.Count
'process the table
With .Tables(i)
'table processing code goes here
End With
'or, perhaps:
.Tables(i).Range.Copy
Next
End With
End Sub
or:
Code:
Sub Demo2()
Dim Tbl As Table
For Each Tbl In ActiveDocument.Tables
'process the table
With Tbl
'table processing code goes here
End With
'or, perhaps:
Tbl.Range.Copy
Next
End Sub
Note how the second one doesn't need to table count.