Terminology Matters Cube Logo
Quintilian Free Macros Download Purchase Contact Home
The following Word macro cleans up segmented text in Word textboxes. It does NOT update your TranslationMemory. The method uses the tw4winClean.Main macro. This requires that the TRADOS template is active.

Sub TextBoxCleaner()
'Send cursor to start of main body text
Selection.HomeKey Unit:=wdStory

'start cycling through each text box
For Each oStory In ActiveDocument.Shapes

'Check if text box contains text
With oStory.TextFrame
If .HasText Then

'if it does, put the cursor at the start of the text in the box
Set myRange = .TextRange
myRange.Select
Selection.Collapse Direction:=wdCollapseStart
End If
End With

'Now that we are inside the text box, run the TRADOS Cleanup macro
Application.Run ("TemplateProject.tw4winClean.Main")

'Go to the next text box
Next oStory

End Sub

Instructions

Launch MS Word and in the VB Editor, add the macro code above.
Now open the file in Word and run the TextBoxCleaner macro to clean all segmented text from any text boxes within your document.