Macro of the Month – February 2022 – LanguageToggle
Changes the language setting of the selected word
Continuing the focus on language macros from January, this month’s macro sets the language of individual words for multilingual projects. I also discuss the easiest way to find new macros and share news of upcoming macro training for both beginners and intermediate macro users.
LanguageToggle
January’s newsletter profiled LanguageSetUS/LanguageSetUK, which changes the language setting of an entire document. But what if you need to change the language setting for individual words, for example, if your project is written largely in Canadian English with a mix of words that need to be set to Canadian French as well as italicized?
To change the language setting of a word or phrase without macros, you must first select the word and navigate through Word’s Language menu, and to italicize the word requires an additional step. Or you can simplify this to a simple click of a keyboard shortcut to let LanguageToggle do all the work.
How to use LanguageToggle: When you come upon a word or phrase that needs to be set to a different language, place the cursor in the word or, in the case of a phrase, select the words and run the macro using its keyboard shortcut.
You will need to set the macro for the language combination of your project and your preference for italics. Here’s how:
1. Once the macro is installed in Word, locate the code for LanguageToggle in the Visual Basic area.
2. Set the myLanguage1 line to the document’s main language. Continuing the prior example, you’d insert Microsoft’s language designator for Canadian English: wdEnglishCanadian. Leave the addItalic1 line set to False.
3. Set the myLanguage2 line to the document’s secondary language. For Canadian French, you’d use wdFrenchCanadian. Set the addItalic2 line to True if you want the term italicized. Otherwise, set it to False.
You can find a complete list of the language codes on Microsoft’s website. Here are some options:
Australian English: wdEnglishAUS
Canadian English: wdEnglishCanadian
Canadian French: wdFrenchCanadian
Irish English: wdEnglishIreland
New Zealand English: wdEnglishNewZealand
South African English: wdEnglishSouthAfrica
UK English: wdEnglishUK
US English: wdEnglishUS
French: wdFrench
German: wdGerman
Spanish: wdSpanish
Tip – Finding useful macros
When you find yourself performing a repetitive task over and over—perhaps grumbling to yourself about it—this is the perfect time to look for a macro. It’s easy to forget to do later, kind of like going to the grocery store without a list.
The Macro Menu is the most efficient way to find new macros. Here you can both see all the available macros organized into 24 categories and obtain the macro code to install in Word.
Here are two of the categories of macros in the Macro Menu: bookmarks and comments.
When you find yourself having to delete pairs of overused parentheses, for example, open the Macro Menu and search for “parentheses”. Look through the results focusing on the macro names and brief descriptions to find one or two to test out. To get a copy of the macro code to install into Word, click on the macro name; it will open a webpage containing the code for just that macro.
You can find a longer description of how the macro works by clicking on the brief description on the right. A new webpage will open; search for the macro name to locate the description.
Upcoming Training – Macros A to Z
Is the thought of installing macros keeping you from getting started? Or do you have some experience with macros but want to get more out of them, including finally conquering how FRedit works?
In the upcoming Macros A to Z course, you will learn how to increase your editing efficiency—and hence your income—by using macros. Over six weeks, you will try out the macros that are the most popular among editors to streamline the repetitive and onerous aspects of your projects. And you will have ample opportunity to get your questions answered and your technical roadblocks solved, including three Zoom Q&As. Macros are equally usable on Macs and PCs.
The course starts on April 18 through the Editorial Freelancers Association. Members of CIEP, IPEd, and Editors Canada are eligible for the member rate; check with your editing organizations for details.
When do you find it easiest to look for new macros? Reply to this email and let me know. Or tell me what your current favorite macro is.
Regards,
Jennifer