I've been writing a Word Link Library (a renamed DLL with some
autoexecute routines) and I've run across a problem.
I'm trying to allow a macro to pass the name of a macro to a WLL routine
which then executes it via wdCommandDispatch and the equivalent of
"ToolsMacro .Name=macroName .Run".
If I initiate the ToolsMacro call directly from the WLL, the call will
succeed and there are no problems.
If, however, a macro calls the WLL which in turn calls ToolsMacro, the
call will succeed but Word will GPF when Word code is next re-entered.
1) WLL --> ToolsMacro == OK
2) macro --> WLL --> ToolsMacro == GPF when Word code is reentered
What I think may be happening:
1) There is a reentrancy problem in which case I am out of luck.
2) I've overflowed the Word stack/heap in which case I can probably
do some work to switch to my own stack/heap.
If you have suggestions or if you can help, please let me know.