VBA 97 vs VBA 2000 
Author Message
 VBA 97 vs VBA 2000

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



Tue, 25 May 2004 05:41:17 GMT  
 VBA 97 vs VBA 2000
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



Tue, 25 May 2004 07:44:05 GMT  
 VBA 97 vs VBA 2000
Jonathan,

Many thanks my friend. I really appreciate all the time and effort you put
into this newsgroup. I hope you have a stupendous Holiday season.

Dennis


Quote:
> 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



> > 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



Wed, 26 May 2004 22:45:58 GMT  
 VBA 97 vs VBA 2000
Jonathan,

Many thanks my friend. I really appreciate all the time and effort you put
into this newsgroup. I hope you have a stupendous Holiday season.

Dennis


Quote:
> 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



> > 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



Thu, 27 May 2004 00:14:21 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Excel 97 VBA vs Excel 2000 VBA

2. convert vba 2000 to vba 97

3. Access 2000 VBA Handbook vis a vis Access 97 VBA Handbook

4. Proj 98 VBA vs Proj 2000 VBA

5. Converting Access 2000 to 97 using VBA...

6. Access 97 VBA Problem with Windows 2000

7. Access 97 VBA modifications not visible in Access 2000

8. Using VBA to Convert Access 2000 database to Access 97

9. vba access 97 -> access 2000

10. 97 to 2000 VBA probelms.

11. VBA problem between 97 and 2000 runtimes.

12. VBA OpenDatabase: Access 97 <-> Access 2000

 

 
Powered by phpBB® Forum Software