WD: "WordBasic Err=25: Out of Memory (Stack Space)" |
Q107796
When you run a macro in Word 7.x, the following error message appears:
When you run a macro in Word 6.x, you get the error message:Winword caused an illegal operation (i.e. Winword caused an exception in module Kernel32.dll)
In Word 2.x for Windows, the error message is:WordBasic Err=25: Out of Memory (Stack Space)
This problem does not occur in Word 97 for Windows or Word 98 Macintosh Edition for Windows.WordBasic Err=7: Out of Memory
Word 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.
Word 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.
The 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
Keywords : kberrmsg kbmacro winword word7 word95
Issue type : kbprb
Technology :
|
Last Reviewed: November 4, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |