Two of my favourite Word macros are counting words inserted with track changes and extracting those words to translate them in SDL Trados Studio (or other CAT tool). I mentioned the first macro in a blog post seven years ago when Studio introduced a new feature to show track changes in source segments. The subject cropped up again on Twitter last week and I promised to share the macros in a new blog post.
What is a macro? It’s a sequence of actions bundled into a single command or mouse click to avoid repetitive, time-consuming tasks (like counting inserted words).
How do you install a macro? Read this old but fail-safe post on the Word MVP (Most Valuable Professional) website.
How do you run a macro? In an open Word document, click Alt+F8, select the macro and click Run. If you use a macro often, assign a shortcut or add a button to the ribbon.
Macro 1: Count words inserted with track changes in Word
The macro below returns a fast and reliable result in a pop-up window. I found it in a PC Review forum posted halfway down the page by Jay Freedman, a Word MVP.
The macro will count all new inserted words, but it ignores any deleted text or other changes.
Macro 2: Extract track changes into a new Word document
I use this macro to translate big chunks of inserted text. The macro creates a table in a new document, I remove the deleted words in red and then translate the new text in Studio, taking advantage of the clean interface and my translation memory.
Here’s the link to the original macro, created by DocTools.
A final word about macros and security: macros downloaded from the internet may contain malicious code. Only install third-party macros that have been recommended to you by someone you trust.
Thank you very much. I have the impression these two will be really useful to me soon.
Thank you! It might be useful as I work on new versions of SPCs containing track changes.
Doesn’t work with newer versions of Word.
I get “Run-time error 5852 Requested object not available”
The debug ALWAYS stops at oRevision.Type
Haven’t been able to find the solution to this. Very, very frustrating.
Sorry to hear that, Carlos. I’m not a macro expert, so I don’t know how to help, although I can confirm that both macros work in newer versions of Word. I use Word 2019.