Hi Dennis
If you look in the Word VBA helpfile for Word 2000, you'll see an area
titled "What's New for Microsoft Word 2000 Developers"
If you need different versions of the code for the different versions of
Word, then use the following arrangement
#If VBA6 Then
' Word 2000 code here
#Else
' Word 97 code here
#EndIf
Those # characters are there deliberately. These are compiler directives,
not branches. What they mean is that in non-VBA6 environments (i.e Word 97)
only the second part of the code will be compiled. This means that if the
VBA6 part contains objects or functions that aren't available to Word 97,
they will not trigger a compiler error.
--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.*-*-*.com/
Word FAQs at http://www.*-*-*.com/
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email
Quote:
> Is there a list of what commands/code work in VBA 2000 but do not work in
> VBA 97? I am creating a series of macros and they run fine in Word 2000
but
> when I try them in Word 97 they don't work. Using the de{*filter*} I can get
> them to work in Word 97 but then they won't work in Word 2000!!!
> Is my best bet just to create two templates, one for Word 2000 and another
> for Word 97?
> Thanks,
> --
> Dennis