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.
Sometimes you receive documents where the client has inserted new English paragraphs in your old German translation. With this macro you can hide the German paragraphs so that you can import only the English paragraphs in your CAT tool.
Add your test words in the line strWords = strWords & "this,short".
Adapt the languages to your needs.
Before running this macro, you'll have to select all text and hide it.
(For now, the macro only works in the main story.)
Sub UnhideEnglishParagraphs()
ActiveDocument.ActiveWindow.View.ShowHiddenText = True
Application.ScreenUpdating = False
Dim strWords As String, i As Long
strWords = strWords & "this,short"
With ActiveDocument
With .Range
.LanguageID = wdGerman
With .Find
.Replacement.ClearFormatting
.Replacement.Text = "^&"
.LanguageID = wdGerman
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = True
End With
For i = 0 To UBound(Split(strWords, ","))
.Find.Text = Split(strWords, ",")(i)
Do While .Find.Execute
.Paragraphs.First.Range.LanguageID = wdEnglishUK
.Paragraphs.First.Range.Font.Hidden = False
.Collapse wdCollapseEnd
Loop
Next i
End With
End With
Application.ScreenUpdating = False
ActiveDocument.ActiveWindow.View.ShowHiddenText = False
End Sub
[Edited at 2023-01-12 20:35 GMT]
Subject:
Comment:
The contents of this post will automatically be included in the ticket generated. Please add any additional comments or explanation (optional)
Here is a macro that helps you to find relevant test words:
Sub HideEnglishParagraphs()
'This macro helps you to find test words
ActiveDocument.ActiveWindow.View.ShowHiddenText = False
Application.ScreenUpdating = False
Dim strWords As String, i As Long
strWords = strWords & "engine,force,pressure,steam"
With ActiveDocument
With .Range
.LanguageID = wdGerman
With .Find
.Replacement.ClearFormatting
.Replacem... See more
Here is a macro that helps you to find relevant test words:
Sub HideEnglishParagraphs()
'This macro helps you to find test words
ActiveDocument.ActiveWindow.View.ShowHiddenText = False
Application.ScreenUpdating = False
Dim strWords As String, i As Long
strWords = strWords & "engine,force,pressure,steam"
With ActiveDocument
With .Range
.LanguageID = wdGerman
With .Find
.Replacement.ClearFormatting
.Replacement.Text = "^&"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = True
End With
For i = 0 To UBound(Split(strWords, ","))
.Find.Text = Split(strWords, ",")(i)
Do While .Find.Execute
.Paragraphs.First.Range.Font.Hidden = True
.Paragraphs.First.Range.HighlightColorIndex = wdYellow
.Collapse wdCollapseEnd
Loop
Next i
End With
End With
Application.ScreenUpdating = False
ActiveDocument.ActiveWindow.View.ShowHiddenText = True
End Sub
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.
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