Microsoft KB Archive/59349

Moving a Macro to Another Template in Word for Windows PSS ID Number: Q59349 Article last modified on 07-14-1994

1.00 1.10 1.10a 2.00 2.00a 2.00a-CD 2.00b 2.00c

WINDOWS

= SUMMARY =

Microsoft Word for Windows version 1.x does not have a built-in function that directly moves or copies macros to other templates.

Word for Windows version 2.0 includes a macro to copy or move macros between templates. To install this macro, open the file named NEWMACRO.DOC in the Word for Windows program directory. This file contains a macro named InstallMacro. The following is a description of the InstallMacro:

Copies or moves the selected macro to the specified template; assigns the macro to the specified key and menu.

= MORE INFORMATION =

To move a macro to another template in Word for Windows version 1.x, use the following steps:

  In Word for Windows versions 1.x, locate the macro, and display it in the source template using the Edit command on the Macro menu.   After you have the macro on the screen, select the entire macro (press CTRL+Keypad 5), and copy the macro to the Clipboard (press CTRL+INS).   Start a new document using the target template. Now you are ready to create a place to put the copied macro in this template.   From the Macro menu, choose Edit, and type the name of the macro you want to create (or select the macro from the list into which you are pasting the copied macro).   If you type a unique name and press ENTER, the macro editor displays an empty screen with the following lines: SUB Main END SUB   Replace the two lines shown above with the source macro [delete these lines, then insert the macro from the Clipboard (press SHIFT+INS)]. You now have the macro in the target template ready for editing.   Exit the macro editor and save the macro to the template upon exiting the document. 

Note: The new macro should look exactly like the source macro. Be sure that there are not two “Sub Main” statements in the macro code.

Additional reference words: 1.00 1.10 1.10a 2.00 1.0 1.1 1.1a w4wmacro winword w4wtemplate find

=
================================================================

Copyright Microsoft Corporation 1994.