VBA macros are stored in projects. A project is a collection of modules, and in Word, each document or template contains a single project. Within each project, macros are stored in modules. A module is a collection of VBA code, such as procedures, functions, and other declarations. A project can contain any number of modules. Each macro is stored as a procedure, or collection of VBA statements, in a module. Each module can contain as many individual macros as you want. When you record a macro, Word stores the VBA code in a module named NewMacros.
Modules can be added, renamed, and otherwise manipulated as required to obtain the desired functionality.
If you have a module containing some useful macros in a given template, you might want to reuse that module in another template. You can use Word's Organizer to copy macros from one project to another:
Choose Tools, Macro, Macros, or press Alt+F8, to display the Macros dialog box.
Click Organizer. The Organizer dialog box appears, as shown in Figure 32.8. This dialog box lets you display the modules in two templates or documents and copy modules from one list to another.
Under either list, you can display a different template by clicking the Close File button, and then clicking Open File and selecting a different template or document.
To copy a module from one list to another, select the module that you want to copy and click Copy. The macro is copied to the destination list. If a module with the same name is already in the destination project, Word won't let you copy the module. If you still want to copy the module, you must rename it before copying it (see the next step).
To rename a module, select the module and click Rename. Type the new name for the module and click OK.
To delete a module from a project, select the module and click Delete. Word asks for confirmation that you really want to delete the module.
After you delete a module and save the template that contained it, there is no way to recover the deleted module.
When you are finished using the Organizer, click Close.
The Organizer copies, renames, and deletes only entire modules, each of which might contain many individual macros.