Today’s kudos go to Jaros_aw Michalak at www.proz.com for a stroke-of-genius-kind-solution to a problem I have been recently facing.
I had to deal with a word file of about 30 pages full of tables big and small, formatted from innocently poor to viciously abhorrent. After a couple of minutes it became painfully apparent that the tables actually made no sense and the presented dataset could be boiled down to a bulleted list. So here we go:
Given: A bunch of tables that make no sense.
Required: Convert all tables to text in a flash.
Solution: A macro with just five lines from Jaros_aw Michalak that goes like this:
Sub AllTablestoText() For Each aTable In ActiveDocument.Tables aTable.ConvertToText wdSeparateByCommas, True Next aTable End Sub
Copy this baby into a macros module (here’s how) of your file, or default template, and off you go to convert all tables to text in your entire document.
The conversion happens instantly, and as you can see from the code, this macro uses commas (wdSeparateByCommas) as columns separators in the resulting text. If you paragraph, or tabs-kind-of-guy/girl, use wdSeparateByParagraphs or wdSeparateByTabs respecively.
If the presented dataset does not warrant table use, nuk’e em tables with this awesome macro!