Translating embedded worksheets

Sometimes you receive Word documents that contain tables that in fact are Excel spreadsheets. At first sight, they look like graphics. However, when you position the mouse over them, on the status bar you see the message "Double-click to Edit Microsoft Excel Worksheet".

1.png

When you import this document in CafeTran, it looks like this:

2.png

The embedded tables are not imported.

Opening the Word document as a ZIP folder

  • Create a ZIP file by renaming the DOCX file by adding .ZIP to the file extension.
  • Open the ZIP in a file manager.
3.png
  • Navigate to the word folder.
4.png
  • Copy the embeddings folder to a CafeTran project folder:
5.png
  • Create a new CafeTran project.
  • Select the File type Ms Excel.
  • Select the Embeddings folder.
6.png
  • Click OK to open the worksheets in the grid:
7.png
  • Translate the worksheets.
  • Export the translated worksheets.
  • Rename the exported worksheets in a file manager to their original names.
  • Copy the worksheets to the Embeddings folder:
0.png
  • Rename the DOCX.ZIP folder by removing the .ZIP part.
  • Open the DOCX file in Word.
  • Update the embedded tables:
8.png
  • Check the result:
9.png

Refreshing the tables macro-wise

If you like a bit of magic, you can use this macro to update all embedded tables:

Sub UpdateAllEmbeddedObjects()
'Updates embedded Excel tables in documents translated with CafeTran

Dim aTable As Object
Application.ScreenUpdating = False

For Each aTable In ActiveDocument.InlineShapes

aTable.Select
Selection.InlineShapes(1).OLEFormat.DoVerb VerbIndex:=1

Next aTable

Application.ScreenUpdating = True
End Sub

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License