Exporting MS Word tables column #7
Thread poster: DZiW

DZiW
Ukraine
English to Russian
+ ...
Oct 5

I've got a few pretty long DOCX documents where many tables of the same format are inserted into the text.

How one could export column #7 from ALL the tables to a new file?

Some VBA or an offline tool, perhaps?

Thank you.


 

Tony M
France
Local time: 21:03
Member
French to English
+ ...
Quick and dirty solution! Oct 6

How about extracting all the tables (I believe there are utilities that can do this), then doing 'Convert table to text' followed by 'Convert text to table' in order to concatenate them all into one big table; and then simply select columns 1–6 and delete?

 

Samuel Murray  Identity Verified
Netherlands
Local time: 21:03
Member (2006)
English to Afrikaans
+ ...
@DZiW Oct 6

DZiW wrote:
How one could export column #7 from ALL the tables to a new file?


A temporary solution until something better comes along. Add this macro, then add a keyboard shortcut to it, then visit each table (click anywhere in it) and press the shortcut. When you've done all tables, delete all non-highlighted text.

Sub temporarysolution()
Selection.Tables(1).Columns(7).Select
Selection.Range.HighlightColorIndex = wdBrightGreen
End Sub

The macro quits with an error if a table has fewer than 7 columns, which makes it difficult for me personally to simply tell the macro "do this for all tables", because the macro will exit if it encounters a table with fewer than 7 columns.

Another solution is to copy/paste everything into Excel and then grabbing just the 7th column. Or, if that doesn't work, here's a macro that converts all tables to tabs, so you could try to run it, then copy everything to Excel:

Sub tablesconvert_tab()
For Each aTable In ActiveDocument.Tables
aTable.ConvertToText wdSeparateByTabs, True
Next aTable
End Sub


DZiW
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Exporting MS Word tables column #7

Advanced search






SDL Trados Studio 2019 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2019 has evolved to bring translators a brand new experience. Designed with user experience at its core, Studio 2019 transforms how new users get up and running, helps experienced users make the most of the powerful features.

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

More info »



Forums
  • All of ProZ.com
  • Termsøk
  • Jobber
  • Forumer
  • Multiple search