WD: "WordBasic Err=25: Out of Memory (Stack Space)"Last reviewed: February 2, 1998Article ID: Q107796 |
The information in this article applies to:
SYMPTOMSWhen you run a macro in Word 7.x, the following error message appears:
Winword caused an illegal operation (i.e. Winword caused an exception in module Kernel32.dll)When you run a macro in Word 6.x, you get the error message:
WordBasic Err=25: Out of Memory (Stack Space)In Word 2.x for Windows, the error message is:
WordBasic Err=7: Out of MemoryThis problem does not occur in Word 97 for Windows or Word 98 Macintosh Edition for Windows.
CAUSEWord 7.x is able to nest macros as deep as 15 levels. When it tries to open the 16th macro, it will return the error message. Word 2.x allows you to nest macros as deep as 11 levels. Word 6.x allows fewer than that. The actual amount varies, but it is typically between 6 and 9. This is because Word 6.x requires more overhead when calling a macro to account for the added functionality of passing array variables. This behavior is by design.
RESOLUTIONWord does NOT use as much overhead when calling subroutines within a macro. If you require nesting routines deeper than six levels, Microsoft recommends that you contain your functions within the same macro module.
MORE INFORMATIONThe following is an example of a nested macro:
Sub MAIN REM This macro is called Test1 MsgBox "test1" Call test2 End Sub Sub MAIN REM This macro is called Test2 MsgBox "test2" Call test3 End Sub Sub MAIN REM This macro is called Test3 MsgBox "test3" Call test4 End Sub...continue until Test9 for Word 6 for Windows, Test12 for Word for Windows 2.x.
|
Additional query words: macro
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |