Select the product you need help with
WD97: WordBasic MacroCopy Command FailsArticle ID: 170267 - View products that this article applies to. This article was previously published under Q170267 On This PageSYMPTOMS
When you attempt to use a WordBasic.MacroCopy command to copy a macro
from any location other than a local template to any location other
than a global template, the copy may fail.
The table that follows details how the WordBasic.MacroCopy, WordBasic.Organizer, and Application.OrganizerCopy commands perform in Microsoft Word 97 SR-1. NOTE: "Global Temp" indicates any template loaded globally (that is, it is loaded by clicking Templates And Add-Ins on the Tools menu). An error will be generated when you try to perform any of the illegal copies. The error message will change depending on the command used and the target. Using WordBasic.MacroCopySource Target Valid Err Error Message ---------------------------------------------------- Document Document Yes Document Template Yes Document Normal Yes Document Global Temp No* 24 Bad Parameter Template Document Yes Template Template Yes Template Normal Yes Template Global Temp No* 24 Bad Parameter Normal Document No 24 Bad Parameter Normal Template No 24 Bad Parameter Normal Normal No 24 Bad Parameter Normal Global Temp No 24 Bad Parameter Global Temp Document No 24 Bad Parameter Global Temp Template No 24 Bad Parameter Global Temp Normal No 24 Bad Parameter Global Temp Global Temp No 24 Bad Parameter Using WordBasic.OrganizerSource Target Valid Err Error Message ------------------------------------------------------------------------ Document Document Yes Document Template Yes Document Normal Yes Document Global Temp No* 1844 The project item cannot be copied Template Document Yes Template Template Yes Template Normal Yes Template Global Temp No* 1844 The project item cannot be copied Normal Document No 102 Command failed Normal Template No 102 Command failed Normal Normal No 102 Command failed Normal Global Temp No 102 Command failed Global Temp Document No 102 Command failed Global Temp Template No 102 Command failed Global Temp Normal No 102 Command failed Global Temp Global Temp No 1844 The project item cannot be copied Using Application.OrganizerCopySource Target Valid Err Error Message ------------------------------------------------------------------------ Document Document Yes Document Template Yes Document Normal Yes Document Global Temp No* 5940 The project item cannot be copied Template Document Yes Template Template Yes Template Normal Yes Template Global Temp No* 5940 The project item cannot be copied Normal Document No 4198 Command failed Normal Template No 4198 Command failed Normal Normal No 4198 Command failed Normal Global Temp No 4198 Command failed Global Temp Document No 4198 Command failed Global Temp Template No 4198 Command failed Global Temp Normal No 4198 Command failed Global Temp Global Temp No 5940 The project item cannot be copied CAUSE
This functionality is by design in Microsoft Word 97 SR-1, in an effort to
reduce the spread of macro viruses. This behavior is different from
Microsoft Word 97. In Microsoft Word 97, the command will be executed as
expected.
WORKAROUND
Instead of using the WordBasic object to copy macros from one location to
another, use the Microsoft Word 97 object model.
For more information about equivalent commands in the Microsoft Word 97 object model, click the Office Assistant, type "What is WordBasic.MacroCopy?," click Search, and then click to view "Visual Basic Equivalents for WordBasic Commands." NOTE: You must be in the Visual Basic Editor before you click the Office Assistant for help. NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Word Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base: 120802
(http://support.microsoft.com/kb/120802/EN-US/
)
Office: How to Add/Remove a Single Office Program or Component
REFERENCES
For more information about macro viruses, please see the following article
in the Microsoft Knowledge Base:
163932
For more information about macro viruses, click the Office Assistant, type
"macro virus," click Search, and then click "Check documents for macros
that might contain viruses."
(http://support.microsoft.com/kb/163932/EN-US/
)
WD: Frequently Asked Questions About Word Macro Viruses
PropertiesArticle ID: 170267 - Last Review: September 1, 2006 - Revision: 2.0
|



Back to the top








