Extract tables from a Word document Thread poster: Noemi Carrera
| Noemi Carrera Spain Local time: 11:07 Member (2003) English to Spanish
Hi all, I would like to know if there is any method to extract tables from a Word document. The text I am working on at the moment has a lot of pages and, apart from that, a lot of tables. This slows down Trados and Word itself. Any ideas? Thank you very much in advance. Regards, Noemí | | | ttagir Local time: 12:07 Member (2002) English to Russian + ... U may work with 2 files. It helps sometimes:) | Oct 10, 2003 |
Copy you file, say origin.doc into 3 copies: compare.doc, text.foc. and tables.doc Open text doc and kill all tables. Open then tables and kill all text pieces. Then start TRADs TM WB and treat separately text.doc and tables doc. The resulting files when can be joined into opened compare.doc by past+copy from results of text and tabs treated. In this case, 1) TRAD has not go mad with complex composition of page; 2) easily works with tabs and text separately. It may also help ... See more Copy you file, say origin.doc into 3 copies: compare.doc, text.foc. and tables.doc Open text doc and kill all tables. Open then tables and kill all text pieces. Then start TRADs TM WB and treat separately text.doc and tables doc. The resulting files when can be joined into opened compare.doc by past+copy from results of text and tabs treated. In this case, 1) TRAD has not go mad with complex composition of page; 2) easily works with tabs and text separately. It may also help if you like compsci and PC:) Yours, Tagir.
[Edited at 2003-10-10 11:10] ▲ Collapse | | | Another trick | Oct 10, 2003 |
If there are not too many tables, you can save a copy of the file and convert all tables to text. Then you translate this file (not slowed by tables), save it and tranlate the original file (including tables) using the Tools - Translate feature from workbench. Jørgen | | | 4 Methods to Extract Tables from Your Document | May 3, 2017 |
There are many methods to do so: 1. If you want to extract all tables in your document, you can use the following VBA codes: Sub ExtractTablesFromOneDoc() Dim objTable As Table Dim objDoc As Document Dim objNewDoc As Document Dim objRange As Range Set objDoc = ActiveDocument Set objNewDoc = Documents.Add For Each objTable In objDoc.Tables objTable.Range.Select Selection.Copy ... See more There are many methods to do so: 1. If you want to extract all tables in your document, you can use the following VBA codes: Sub ExtractTablesFromOneDoc() Dim objTable As Table Dim objDoc As Document Dim objNewDoc As Document Dim objRange As Range Set objDoc = ActiveDocument Set objNewDoc = Documents.Add For Each objTable In objDoc.Tables objTable.Range.Select Selection.Copy ' Paste tables to new document in rich text format. Set objRange = objNewDoc.Range objRange.Collapse Direction:=wdCollapseEnd objRange.PasteSpecial DataType:=wdPasteRTF objRange.Collapse Direction:=wdCollapseEnd objRange.Text = vbCr Next objTable End Sub 2. If you only want to extract a specific table from your document, you can use the following code: Sub ExtractSpecificTables() Dim objTable As Table Dim objDoc As Document Dim objNewDoc As Document Dim objRange As Range Dim strTable As String strTable = InputBox("Enter the table number: ") Set objDoc = ActiveDocument Set objNewDoc = Documents.Add objDoc.Tables(strTable).Range.Select Selection.Copy Set objRange = objNewDoc.Range objRange.Collapse Direction:=wdCollapseEnd objRange.PasteSpecial DataType:=wdPasteRTF End Sub 3. If you want to extract tables from multiple documents, you can use the following codes: Sub ExtractTablesFromMultiDocs() Dim objTable As Table Dim objDoc As Document, objNewDoc As Document Dim objRange As Range Dim strFile As String, strFolder As String ' Initialization strFolder = InputBox("Enter folder address here: ") strFile = Dir(strFolder & "\" & "*.docx", vbNormal) Set objNewDoc = Documents.Add ' Process each file in the folder. While strFile "" Set objDoc = Documents.Open(FileName:=strFolder & "\" & strFile) Set objDoc = ActiveDocument For Each objTable In objDoc.Tables objTable.Range.Select Selection.Copy Set objRange = objNewDoc.Range objRange.Collapse Direction:=wdCollapseEnd objRange.PasteSpecial DataType:=wdPasteRTF objRange.Collapse Direction:=wdCollapseEnd objRange.Text = vbCr Next objTable objDoc.Save objDoc.Close strFile = Dir() Wend End Sub 4. Of course, you can copy and paste tables manually. But that will be time-consuming. For more detailed information, you can refer to: https://www.datanumen.com/blogs/4-methods-to-extract-tables-from-one-word-document-to-another/ Hope that helps ▲ Collapse | | | To report site rules violations or get help, contact a site moderator: You can also contact site staff by submitting a support request » Extract tables from a Word document Trados Studio 2022 Freelance | The leading translation software used by over 270,000 translators.
Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop
and cloud solution, empowering you to work in the most efficient and cost-effective way.
More info » |
| CafeTran Espresso | You've never met a CAT tool this clever!
Translate faster & easier, using a sophisticated CAT tool built by a translator / developer.
Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools.
Download and start using CafeTran Espresso -- for free
Buy now! » |
|
| | | | X Sign in to your ProZ.com account... | | | | | |