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.
Subscript numbers in chemical formulas cause a lot of unnecessary tags in CAT tools and they often prevent term recognition and auto-translation. So why not convert them to Unicode?
Sub ConvertSubscriptNumberToEquivalentUnicodeCharacter()
Dim strAscii
Selection.Find.ClearFormatting
With Selection.Find.Font
.Superscript = False
.Subscript = True
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Superscript = False
.Subscript = False
End With
For strAscii = 1 To 9
With Selection.Find
.Text = strAscii
.Replacement.Text = ChrW(strAscii + 8320)
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Next strAscii
End Sub
Instead of:
You'll get:
Clearer view and term recognition.
On a side note: Same goes for Ms Word's bullets, arrows, Wingdings etc.: it would be nice to have them converted to Unicode.
Selection.Find.ClearFormatting
With Selection.Find.Font
.Superscript = True
.Subscript = False
End With
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Superscript = False
.Subscript = False
End With
With Selection.Find
.Text = "TM"
.Replacement.Text = "™"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
There are 2 tools in TransTools and TransTools+ that do similar things, although they do not cover subscripted digits:
1) In Document Cleaner > Tag Cleaner (TransTools for Word) (www.translatortools.net/products/transtools/doccleaner), there is an option called "Replace special symbols with regular characters where appropriate". This converts several symbols from the Symbol font commonly used in Word to their Unicode equivalents to help reduce redundant tags. This option is not enabled by default.
2) In Spacing, Punctuation and Symbol Correction Tool (TransTools+, Word) (www.translatortools.net/products/transtoolsplus/word-symbolizer), there are several options to convert text like (TM), (C), (R), superscript 0 or o used as a degree sign, etc. to Unicode symbols. At the same time, this tool does not perform conversion of characters written in Symbol font, nor does it work on subscripted digits like your macro does.
I will put it into my to-do list to add conversion of subscripted digits to this tool. Thank you for this idea.
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.
Create customer quotes and invoices from within Trados Studio
Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.