If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How: delete tables & save text?
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. |
#2
|
|||
|
|||
How: delete tables & save text?
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 :-) |
#3
|
|||
|
|||
How: delete tables & save text?
|
#4
|
|||
|
|||
How: delete tables & save text?
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). -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Stan" wrote in message ... 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. |
#5
|
|||
|
|||
How: delete tables & save text?
"Suzanne S. Barnhill" wrote:
}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. |
#6
|
|||
|
|||
How: delete tables & save text?
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 My web site www.gmayor.com Word MVP web site http://word.mvps.org Stan wrote: "Suzanne S. Barnhill" wrote: }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. |
#7
|
|||
|
|||
How: delete tables & save text?
"Graham Mayor" wrote:
}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. |
Thread Tools | |
Display Modes | |
|
|