ID: Q115338
6.00 6.00a WINDOWS kbusage kbmacro
The information in this article applies to:
A general protection (GP) fault occurs when you run a macro that contains a MacroCopy statement with incorrect syntax. If you precede the Macro2 (new macro) name with a colon but you do not specify the optional Template2 (destination template) argument, the GP fault occurs.
For example, this statement will result in a GP fault:
MacroCopy "Normal:TestMacro", ":TestMacroCopy"
The correct syntax when you omit the optional template name is to omit the colon.
Microsoft has confirmed this to be a problem in Word versions 6.0 and 6.0a for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
If you don't specify a source or destination template, the Normal (or global) template is assumed. To copy the macro to the global template without specifying "Global," omit both the destination and the colon, as in the following example:
MacroCopy "Normal:TestMacro" "TestMacroCopy"
You can use the MacroCopy command to copy a macro (Macro1) from one open template (Template1) to another (Template2) or from one macro name (Macro1) to another (Macro2) within the same template. The syntax is as follows:
MacroCopy "[Template1:]Macro1", "[Template2:]Macro2"
The second parameter specifies the destination for the copy. In the
destination parameter, both a destination template and destination macro
name can be specified, separated by a colon. When the destination template
is omitted, the global (Normal.dot) template is assumed.
"Microsoft Word Developer's Kit," page 561
Kbcategory: kbusage kbmacro KBSubcategory: Additional reference words: 6.00 6.00a gpf copying macros word6 winword macrocopy global template
Version : 6.00 6.00a
Platform : WINDOWS
Last Reviewed: August 4, 1997