MS Word

Move a Macro from One Template to Another

The Problem:

I reckon I've more or less gotten the hang of the Visual Basic Editor by nowat least, I can create and edit macros in different projects. But do you mean to tell me that I need to use Cut and Paste to move a macro from one project to another?

The Solution:

You've hit upon one of the Visual Basic Editor's most dramatic shortcomings: the inability to copy or move a macro quickly from one project (a template or document) to another. But Word itself can take care of this task:

  1. choose Tools » Macro » Macros

  2. click the Organizer button in the Macros dialog box

  3. and then click the Macro Project Items tab

See which projects are open in the two "Macro Project Items available in" boxes; if necessary, click the Close File button to close one of the open projects, and then use the resulting Open File button to open the relevant project. With the projects open, select the item you want to copy, and click the Copy button. To move an item, copy it to the new location and then click the Delete button to delete it from the source project.

When you've finished copying or moving items, click the Close button to close the Organizer dialog box, and save the documents or templates with which you've been working.