How: delete tables & save text?

S

Stan

Environment: MS Word 2000, Win XP

Many documents...

Each document is a series of 2 tables, side by side...anywhere from 20
to 60 tables total.

I want to get rid of all tables (yes, I know I can do them one by one,
but I need something automatic for the "lowest-common-denominator" user)
but keep ONLY the text in the right tables, deleting the text in the
left tables.

And, if you're really up for a challenge...there will be some text
that occaisionally appears between the tables...it would be cool if
that text could be automatically put in parathesis.

I know...sounds like a lot...but if anyone could do it you would
have my gratitude.

Stan.
 
C

Cindy M -WordMVP-

Hi Stan,

Not sure whether I'd have time, but in order to start, one would at least
need to know
- version of Word
- HOW the tables have been positioned side-by-side
Many documents...

Each document is a series of 2 tables, side by side...anywhere from 20
to 60 tables total.

I want to get rid of all tables (yes, I know I can do them one by one,
but I need something automatic for the "lowest-common-denominator" user)
but keep ONLY the text in the right tables, deleting the text in the
left tables.

And, if you're really up for a challenge...there will be some text
that occaisionally appears between the tables...it would be cool if
that text could be automatically put in parathesis.

I know...sounds like a lot...but if anyone could do it you would
have my gratitude.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
S

Stan

(e-mail address removed) wrote:

}Hi Stan,
}
}Not sure whether I'd have time, but in order to start, one would at least
}need to know
} - version of Word

Originally I said Word 2000...I lied, actualyy it's Word 2002 (10.2627.2625).

} - HOW the tables have been positioned side-by-side

T'was misinformed...after looking I see many 2-celled tables...
(I hope I have my terminalogiy right)...

I want to keep the text in the right-hand cells, discard the text in the
left-hand cells (several of which are empty already) and have the whole
thing come out as text.

TIA,

Stan.
 
S

Suzanne S. Barnhill

1. Select the left column, right click, and choose Delete Column.

2. Select the right column and choose Table | Convert | Table to Text,
selecting the options that result in the most suitable output (if the first
attempt is not satisfactory, Undo and try again).
 
S

Stan

}1. Select the left column, right click, and choose Delete Column.
}
}2. Select the right column and choose Table | Convert | Table to Text,
}selecting the options that result in the most suitable output (if the first
}attempt is not satisfactory, Undo and try again).

Thanx, but I'm looking for a way to do the whole document at once...
this will be done by a non-computer-literate person...so I'm looking
for a macro I guess (or similar).

Once again, this is a document created with many tables, with the
text of interest in the right-hand cells only.

Stan.
 
G

Graham Mayor

Unless Cindy comes up with something better - if your changing description
of the tables is correct in that the tables have two columns and you want
the content of the right column plus any other text not in a table then the
following should work.

Dim Count, Char As String
Count = 1
Do
On Error GoTo Oops
Selection.GoTo What:=wdGoToTable, Which:=wdGoToFirst, _
Count:=Count, Name:=""
Selection.Columns.Delete
Selection.Rows.ConvertToText Separator:=wdSeparateByParagraphs, _
NestedTables:=True
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdLine
Selection.TypeText Text:="("
Selection.EndKey Unit:=wdLine
Selection.TypeText Text:=")"
Count = Count + 1
Loop
Oops:
Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Char = Selection.Characters(1)
If Char <> Chr$(40) Then
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="("
Selection.EndKey Unit:=wdLine
Selection.TypeText Text:=")"
End If
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "()"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute replace:=wdReplaceAll
End Sub

See http://www.gmayor.com/installing_macro.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

Stan

}Unless Cindy comes up with something better - if your changing description
}of the tables is correct in that the tables have two columns and you want
}the content of the right column plus any other text not in a table then the
}following should work.

I'll give it a try...thanx!

Stan.
 

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