This site uses cookies.
Some of these cookies are essential to the operation of the site,
while others help to improve your experience by providing insights into how the site is being used.
For more information, please see the ProZ.com privacy policy.
De persoon die dit onderwerp heeft geplaatst: Daniel Frisano
Daniel Frisano Italië Local time: 01:02 Lid 2008 Engels naar Italiaans + ...
Mar 3, 2022
Is there a way to use find-and-replace in Word to catch all the blank spaces that occur at the end of table cells? (Or at the beginning, since we're at it.)
In other words, is there an "end of cell" marker that can be used in find-and-replace, possibly inside regex?
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Stepan Konev Rusland Local time: 02:02 Engels naar Russisch
Workaround
Mar 3, 2022
There is no code for the end of cell marker, but you can use a trick. 1. Create a custom style in MS Word, name it Table Cell for example. 2. Mark all your tables with that style. 3. Invoke the find and replace feature with Ctrl+H. 4. Leave the 'Find what' field blank but select the Table Cell style for it. 5. In the 'Replace with' field type ^&@@@ and replace all. 6. Replace [ @@@] (less brackets) with blank field. That will remove all the instances of [spa... See more
There is no code for the end of cell marker, but you can use a trick. 1. Create a custom style in MS Word, name it Table Cell for example. 2. Mark all your tables with that style. 3. Invoke the find and replace feature with Ctrl+H. 4. Leave the 'Find what' field blank but select the Table Cell style for it. 5. In the 'Replace with' field type ^&@@@ and replace all. 6. Replace [ @@@] (less brackets) with blank field. That will remove all the instances of [space+@@@]. 7. Replace @@@ with blank field for the other instances that appear where there was no space initially. Done
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Daniel Frisano Italië Local time: 01:02 Lid 2008 Engels naar Italiaans + ...
ONDERWERPSTARTER
Freakin' brilliant
Mar 3, 2022
Thanks Stepan, worked like a charm.
Since my document is all a big table, I didn't even need to create the custom style.
All I needed was a property that is common to the whole text for the "Find what" field, in my case Font color = Automatic. Or you can use an obscure never-used property as a dummy, like Format > Font > Not Emboss or something.
Stepan Konev
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Stepan Konev Rusland Local time: 02:02 Engels naar Russisch
Workaround 2
Mar 3, 2022
Alternatively you can select all text in your table, then press Ctrl+E, Ctrl+L. This will remove both leading and trailing spaces. However, this workaround may require manual work if you have different paragraph alignment styles.
Elena Feriani
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Rolf Keller Duitsland Local time: 01:02 Engels naar Duits
Word is XML
Mar 4, 2022
FWIW: In Word's document.xml file you can locate & change the text content of table cells. Rename .docx to .zip, then open the .zip file and dig out the document.xml file.
In that file use a regular expression for search and replace. The following is the text you'll find within Word's xml file: {w:tc} ignore some stuff here {w:t} this is the cell's text content {/w:t}
Note: In the above string I used curly brackets, just because ProZ's editor do... See more
FWIW: In Word's document.xml file you can locate & change the text content of table cells. Rename .docx to .zip, then open the .zip file and dig out the document.xml file.
In that file use a regular expression for search and replace. The following is the text you'll find within Word's xml file: {w:tc} ignore some stuff here {w:t} this is the cell's text content {/w:t}
Note: In the above string I used curly brackets, just because ProZ's editor doesn't like angle brackets.
Looks difficult but might be the only way (besides a macro, of course) to achieve certain automatic changes. ▲ Collapse
Stepan Konev
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Daniel Frisano Italië Local time: 01:02 Lid 2008 Engels naar Italiaans + ...
ONDERWERPSTARTER
@RK
Mar 4, 2022
Right, some operations are better done low-level.
Now I'm left wondering if there are editors that allow you to manipulate a Word document LaTeX-style. (Anyone remember TeX and LaTeX?)
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
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
Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.