WD97: WordBasic MacroCopy Command FailsLast reviewed: March 10, 1998Article ID: Q170267 |
The information in this article applies to:
SYMPTOMSWhen 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 (i.e. through Tools/Templates and Add-Ins) other than Normal. An error will be generated when trying to perform any of the illegal copies. The error message will change depending on the command used and the target. Programmatic Macro Copy in Word 97 SR-1
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* Copying from a document or template to a Global Temp WILL WORK if the Global Temp is open in Word for editing.
CAUSEThis 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.
WORKAROUNDInstead 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:
ARTICLE-ID: Q120802 TITLE : Office: How to Add/Remove a Single Office Program or Component REFERENCESFor more information about macro viruses, please see the following articles in the Microsoft Knowledge Base:
ARTICLE ID: Q134727 TITLE: WD: What to Do If You Have a Macro Virus ARTICLE ID: Q163932 TITLE: WD: Frequently Asked Questions About Word Macro Viruses ARTICLE ID: Q162198 TITLE: WD97: Article List: Microsoft Word 97 Word Macro VirusFor 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."
|
Additional query words: sr1 release1 8.0 8.0
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |