
Tips.Net > WordTips Home > Tables > Deleting or Removing Tables > Converting Tables to Text
Summary: Need to convert all the tables in your document into plain text? This tip provides a macro that can make quick work of a bunch of tables. (This tip works with Microsoft Word 97, Word 2000, Word 2002, Word 2003, and Word 2007.)
Tables are a great boon to users of Word. When you are working with documents that were created in a different Word processor, however, tables can be a nuisance. For instance, one WordTips reader complained that his two-column text created in WordPerfect was converted in Word to tables. He asked for a way to automatically convert all the tables to text, without the need to process each table manually.
The following macro, AllTablesToText, will do the trick. It steps through each table in the current document and converts them all to text, with tabs between columns:
Sub AllTablesToText()
Dim Tbls As Long
Dim J As Long
Tbls = ActiveDocument.Tables.Count
For J = Tbls To 1 Step –1
ActiveDocument.Tables(J).ConvertToText Separator:=wdSeparateByTabs
Next J
End Sub
If you don't want tabs between columns, all you need to do is change the value assigned to the Separator parameter. You can use wdSeparateByCommas, wdSeparateByDefaultListSeparator, or wdSeparateByParagraphs.
Tip #866 applies to Microsoft Word versions: 97 2000 2002 2003 2007
Find and Replace Almost Anything! An invaluable resource for learning how to harness the full power of Word's search and replace capabilities. You'll discover everything you need in order to master all the intricacies of finding and replacing elements of your document, including the super-powerful "wildcard searches" available in Word.
Check out WordTips: Find and Replace today!
Uncover how you can master the full potential of printing your documents. Everything you wanted to know about printing and printers, using Word. (more information...)
Ask a Word Question
Make a Comment
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Word2007 Tips
WordTips