Results 1 to 2 of 2
Thread: Macro Locations (Word 97)
2003-03-10, 00:02 #1
- Join Date
- Apr 2002
- East Tennessee
- Thanked 0 Times in 0 Posts
Macro Locations (Word 97)
Is there a way to control macros so that they appear directly in the main portion of the Normal.dot. Lately all of mine are created in a "New Macros" collection, even though in the past I have generated them in the "Main" location.
Also how can I move the ones that I want to save to the "Main"? I have experimented and find that it will allow me to add a module, but not a procedure.
Thanks in advance.Win 8, Firefox 16.0.2, Thunderbird 15.0.2
2003-03-10, 07:38 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Macro Locations (Word 97)
If you create new macros by recording them, Word creates the location for them. I don't know if you can influence it. But it is easy to modify afterwards.
The "collection" and "location" you mention are modules. Visual Basic code is organized in modules. To see this, switch to the Visual Basic Editor - type Alt+F11 or select Tools/Macro/Visual Basic Editor.
Once you are in the Visual Basic Editor, make sure the Project Explorer is visible: type Ctrl+R or select View/Project Explorer. This looks a bit like the left pane of Windows Explorer. You will see entries for all documents and templates that are loaded, with + or - signs to the left of then. You can expand/collapse items by clicking these, just as in Windows Explorer.
Locate Normal in the Project Explorer. Expand it (if necessary). You will see two subitems: Microsoft Word Objects and Modules. Expand Modules. Each subitem of Modules is a module, that is a container of code. You can open a module by double clicking it.
You can move procedures and functions from one module to another by cutting and pasting. (Caution: if you copy and paste a procedure or function within one template or document, you'll run into problems over duplicate declarations.) You can create new macros in a specific module by writing them yourself.