Note: New versions of this macro offer improved functionality. CopyToListAlphabetic adds words to the word list section of your style sheet in alphabetical order; see the March 2024 newsletter to learn how to use it. CopyToListAlphaMenu adds terms to different sections of your style sheet in alphabetical order by giving you a menu to indicate the placement; read about it in the October 2024 newsletter.
last updated: 10/30/2024
This month’s macro makes adding words to your style sheet easier. Also included is a tip for when Microsoft notifies you that it has blocked your macros.
CopyToList
Style sheets are an essential tool for editors. But sometimes we can be reluctant to take ourselves out of the flow of editing to copy a word and paste it into our style sheet. CopyToList will fill out our style sheet for us, letting us maintain our attention on what we’re editing.
How it works: Any time you come to a word you want to add to your style sheet, run CopyToList. It will copy the word—and any formatting—and paste it into your style sheet. It then brings the cursor back to your working document right where you left off.
When you come upon a word you want to add to your style sheet, run CopyToList to paste it into your style sheet. Note: The highlighting is for illustrative purposes only.
How to use it: First, open your style sheet or a blank document for the macro to paste the words into. Important: The file name must contain the word “list”. See the below note about how you can change this setting.
To add a single word to your style sheet, place the cursor anywhere inside the word (no need to select it first) and run CopyToList. For multiword terms, you must select all the words before running the macro.
After you run CopyToList, you can keep on editing. The macro does all the work for you in the background—no need to look at the style sheet. In fact, you can keep the open style sheet on a second screen or in the background.
A note about alphabetizing: CopyToList pastes the text wherever the cursor resides. So as seen in the above illustration, the words will be out of alphabetical order. You can easily sort them by selecting all the words in the list and clicking on the sort icon in the Home tab of the ribbon.
When you are done adding to your style sheet, alphabetize it by selecting all the words and clicking the sort icon on the Home tab of the ribbon.
How to customize it: The code for CopyToList requires that the file name of your style sheet contain the word “list”. You can change that setting in the code by replacing “list” in this line of the code: keyWord = "list". Make sure to keep the quotation marks. For instance, if the names of your style sheets contain the words “Style Sheet,” change the code as such: keyWord = "sheet". Note that it is case insensitive.
Download the code: www.wordmacrotools.com/macros/C/CopyToList
Related macros: Before adding a term to a style sheet, we sometimes have to verify the information, such as with a Google search. GoogleFetch will speed up that process. You can read about GoogleFetch in the February 2021 newsletter, but note that you no longer have to customize the code for your country’s browser. Paul’s Macro Menu contains customized GoogleFetch macros for several different countries; scroll down to the #11 Internet section. This section also provides macros that will search online dictionaries, such as Merriam-Webster and Macquarie, and other databases.
Troubleshooting Tip – Microsoft has blocked my macros from running
Have you received the below message from Microsoft?
Paul Beverley recently put out a video explaining what that message means and how you can unblock your macros. Watch the video if you want more information and for a demonstration of how to change your settings on a PC. Or follow the below steps:
Mac: Microsoft Word > Settings > Security > Macro Security > Select Disable all macros without notification
PC: File > Options > Trust Center > Trust Center Settings > Macro Settings > Select Disable all macros without notification
By changing this setting, the macros you run will still work, but you will be protected from macros that are attached to incoming documents, which can harm your computer, and you won’t be bothered by Microsoft’s notification.
Have a question or want to suggest a macro for a future newsletter? Reply to this email and let me know.
Regards,
Jennifer
PS: The text in the illustrations was taken from the upcoming MultiSwitch from Square One self-training guide. It will be released next month. Stay tuned.