Hello,
We have a one-row, blank table appearing at the bottom of page 1 in hundreds
of documents (it is not in the footer). This was due to a conversion utility
that was used on these docs. Anyway, I need to create a macro that searches
the doc for this table but I can't use a specific table number in the tables
collection because there may be other legitimate tables in some of the
documents, either before or after the blank table. So, I need find the
one-row blank table and delete it.
Any ideas? Your time is always appreciated.
fumei - 04 Mar 2008 21:20 GMT
Is it the ONLY one row table? Are there many of them? Are there any
legitimate one row blank tables?
If there are NO legitimate one row tables - i.e you want to remove all one
row tables - then:
Dim aTable As Table
For Each aTable In ActiveDocument.Tables
If aTable.Rows.Count = 1 Then
aTable.Delete
End If
Next
will delete all one row tables.
>Hello,
>
[quoted text clipped - 7 lines]
>
>Any ideas? Your time is always appreciated.
Sammy - 04 Mar 2008 22:01 GMT
This works wonderfully, thanks.
> Is it the ONLY one row table? Are there many of them? Are there any
> legitimate one row blank tables?
[quoted text clipped - 22 lines]
> >
> >Any ideas? Your time is always appreciated.