There's some fuzziness behind the sentence "However most of them are stored in Normal.dotm and therefore appear in all the templates."
A macro that is stored in Normal.dotm is available in documents based on other templates, but those macros are not "in" the other templates.
If you want certain macros to be available only in documents based on a specific template, then those macros must be stored
in that template and not in Normal.dotm.
There are a couple of ways to move macros from Normal.dotm to another template.
- Open the destination template or a document based on it, and open the VBA editor. Expand both the Normal project and the destination template's project in the Project pane. Then
- Drag the module containing the macros from the Normal project and drop it on the destination project. This copies the module, so then you'll have to right-click the module in Normal and remove it. OR...
- Right-click the module in Normal and choose to export it to a .bas file (and a .frm file if it contains a userform). Then import the file(s) into the destination project. OR...
- Create a new module in the destination project. Cut the code text from Normal's module and paste it in the destination. Remove the now-empty module from Normal.
OR...
- Open the destination template or a document based on it. Press F8 to open the Macros dialog, and click the Organizer button. The Organizer dialog opens with the Macro Project Items tab visible. The right side shows the list of modules in the Normal.dotm
template. If the left side shows the current document, open the "Macro Project Items available in" dropdown and choose the destination template. Then:
- Select one or more (multiple selection while holding down Ctrl) modules in Normal.dotm.
- Click the Copy button.
- While the modules in Normal are still selected, click the Delete button.