Conditional Compilation Help 
Author Message
 Conditional Compilation Help


I am trying to create a macro for word, and I need to
support both Office XP and 2000. There are some commands
I need to run in XP that won't "compile" in XP, and vice

I tried using the conditional compiliation constants, but
those require that I declare the constant before running
the macro - but the whole problem is that I need to
support folks running each one. So I need to get
conditioanl compilation that is run-time dynamic on

If I declare #myVer = "XP" and use #if, it runs fine in
XP. If I declare #myVer = "2000", and use #if, it runs
fien in 2000. But I need to declare run-time and
determine what to compile on the basis of
Application.Version (or anything!).

I have tried several things, including
if application.version = "10.0" then
   #myVer = "XP"
   #myVer = "2000"
end if

#if myVer = "XP" then
   [do stuff I can only do in XP]
   [do stuff I can only do in 2000]
#end if

but of course I get that I can't declare the same
constant twice!

Any help would be divine!

Thanks in advance,everyone.

Sun, 25 Sep 2005 02:03:50 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Conditional Compilation Help

2. Conditional Compilations...please help.

3. global conditional compilation constants in Access 2002

4. conditional compilation constants

5. Access 97: MDE ignores Conditional Compilation Arguments

6. can you change conditional compilation constants in c0de?

7. Conditional Compilation

8. Conditional Compilation Arguments and MDE

9. Dynamic Conditional Compilation Question

10. Conditional compilation to run Word2000 and 97 code under Word97

11. Conditional JIT compilation?

12. FYI: Conditional Compilation (Pedantic) Features


Powered by phpBB® Forum Software