Forum Discussion
Wim_Kooy
Feb 26, 2024Copper Contributor
Microsoft Word 365 (16.0) Word Options - Customize Ribbon - Macros: List not sorted
Can anyone tell me why in Microsoft Word 365 (16.0) the list shown in Word Options - Customize Ribbon - Macros is not sorted?
I have an awful lot of macros and can't find the one I want to add to my ribbon just because the list is not sorted.
- Charles_KenyonBronze Contributor
One more thing...
Macro Naming and organization.
I have thousands of macros and cannot remember the names. I mark most of them as "Private" so they do not even show up on my macro list. When I need to, I go into the vba Editor and use Find there to search through a project.
If I know it is in a certain module, I can use the drop-down list of procedures in the module, which is sorted alphabetically.
Generally when saving a macro, I never use the name suggested by Word, just as I never use that name when saving a Building Block. I will start the name with what it is I am trying to work on. I.e., Watermark, SectionBreak, Paragraph, Font, Style, etc. Then add a bit more about what the Macro does. I do not start macro names with things like Add, Delete, Change, etc. Doing this makes it easier to find macros when they are organized alphabetically.
If you add comments to your macros, the vba editor's Find can search them as well for keywords.
Macros should not be stored in the NewMacros module. That is, for me, simply a scratch workspace and I delete the module from time to time. Organizing your macros by Beth Melton, Word MVP
Macros that are really used in my day-to-day work are not stored in the Normal template at all but in various Global Templates. They are attached to ribbon buttons, QAT buttons, and keyboard shortcuts that are in the same template. QAT buttons and keyboard shortcuts can be created and saved in a template easily in the user interface, no need to go to XML. Most of the macros in my normal template are references, code that I have developed or stolen (with accreditation). I regularly back up my normal template because it seems that even on my own computer, bad things happen to it. This is even more so in corporate workspaces with IT departments that think they know better. Backup Normal.dotm template using a macro (That is one macro that I do store in and use from my Normal template.)
- Charles_KenyonBronze Contributor
I understand your frustration.
What is shown above is from my computer. The bulk of my macros are in different modules than the NewMacros module which is where recorded macros are stored.
By the way, my preference is to put macros on the QAT or assign them to a keyboard shortcut.
- Wim_KooyCopper Contributor
Hi Charles_Kenyon, thank you for your reply.
I put my macro's in a separate tab 'Custom tools' (image attached as well):
Then I export the ribbon and edit the XML to customize it (no icons, no autoresize).
I just wanted to add yet another macro to this tab, hence my question.
My macro's are in different modules as well, depending on their purpose.
From a developer's perspective I don't see why you shouldn't sort a list before filling the listbox.
Speed and/or memory shouldn't be an issue anymore these days.
- Charles_KenyonBronze Contributor
Wim_KooyAny chance that your macros give you snippets of text to go into a document?
If you are using macros for text snippets, you are using the wrong Word feature.
You should be using AutoText, which can also have keyboard shortcuts.
Both AutoText and AutoCorrect can be used for text snippets. These are different features and are both valuable. I use both virtually every time I use Word.
AutoText can have keyboard shortcuts and can AutoComplete; AutoCorrect acts on trigger words as you type. Here are some more resources:
- Exploiting AutoCorrect by Suzanne Barnhill, MVP
- Using Autotext to deal with repetitive text - Legal Office Guru
- Create reusable text snippets
- Word for Wordperfect Users
- AutoFormat and AutoCorrect (Tame AutoFormat) by Suzanne Barnhill, MVP
For anyone who uses Word more than occasionally, I recommend the series of short tutorials prepared by Shauna Kelly a while back. Basic Concepts of Microsoft Word - from Shauna Kelly
If you haven't been using AutoText or AutoCorrect, I would guess that you may not have been using Styles to your advantage, either. The Importance of Styles in Microsoft Word