>The preprocessor run only once, before compiling the source code. Since the preprocessor can't see inside the macro, it cannot replace constants like wdWindowStateMaximize. Which mean that you will receive an error message at run time, since wdWindowStateMaximize doesn't say anything to the called method. It expect a numeric value.
>
>Your second method work, because the preprocessor see the constant and can change it by it's numeric equivalent before the compilation is done.
>
>Since you want to be able to run code inside a memo field, the only solution I see is to ignore the constant (wdWindowStateMaximize) and to use their numeric equivalent instead.
He may also declare the constants used as local numeric variables, by inserting the necessary parts of the .h file and instead of
#define wzWhatever 0
putting
wzWhatever=0
Then the macros should work-