View Single Post
  #3   Report Post  
Klaus Linke
 
Posts: n/a
Default

And if you only want to delete hidden tables:

Dim oTable As Table
For Each oTable In ActiveDocument.Tables
If oTable.Range.Font.Hidden Then
oTable.Delete
End If
Next oTable

Regards,
Klaus


"Charles Kenyon" wrote:
The following macro will delete all tables in the body of a document; =

it=20
won't reach those in headers or footers.
=20
Sub AllTablesDelete()
' Written 2005 June 10 by Charles Kenyon
' Deletes all tables in the body of a document
'
Dim oTable As Table
For Each oTable In ActiveDocument.Tables
oTable.Delete
Next oTable
End Sub
=20
--=20
Charles Kenyon
=20
Word New User FAQ & Web Directory: http://addbalance.com/word
=20
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
=20
See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
=20
"Shubha" wrote in message=20
...
To add to that..I want to avoid the making rows 1 point method =

because the
table is used internally ..so then I would have to go through and =

manually
change every table. It's a document that internally we need certain =

data
for, but externally we have to delete that data. I thought hidden =

text=20
was
the best way.

"Shubha" wrote:

I want to make a table and the content hidden. When I do so, it =

seems to
work in that if I have the show hidden text option off, the table is =

no
longer visible and the text before and after the table do get closer
together. However if I do a replace on all hidden text to delete =

it, the
content in the table gets deleted, but the table remains. I end up =

with=20
a
blank table. How can I either make the table hidden as well, or =

delete=20
*all*
the tables in my document at once?=20

=20