versions question

J

john.finnis

How stable/compatibl are the various versions of Word VBA?

I have written a number of macros in the VBA supplied with Word 2000.

Will these scripts be usable on earier/later versions of MS Word?
 
P

Peter Jamieson

Broadly speaking, whether your VBA will work depends partly on what it
is doing.

1. VBA itself
a. Prior to Word 97, Windows Word used WordBasic which is a completely
different dialect of Basic - however, I doubt many people are using Word
95 or earlier now.
b. Word 97 uses VBA5.
c. Word 2000, XP (2002), 2003 and 2007 all use VBA6. There are
differences, e.g. there are new string functions (see e.g.

http://support.microsoft.com/default.aspx?scid=kb;en-us;188007

which describes VB6 but I believe these were also new in VB6)

2. Probably more important are changes in Word's object model in
different versions of Word itself (and perhaps other object models if
you are using components outside Word). Typiclaly new versions of Word
introduce new objects or extend old ones, so your code its still likely
to work, but you still need to test it. Word's behaviour in some areas
(e.g. mailmerge) has changed quite significantly - don't expect Word
2000 VBA code to work in Word 2002, for example - but the changes
required are not necessarily large.

3. On Mac, I believe VBA5 came in with Word 98 and was available in Word
2001, Word X, and Word 2004. VBA6 was not implemented on Mac Word. VBA
is not available in Word 2008. There are similar considerations re.
object models in Mac Word, and there are cross-platform differences.
Again, plenty of your code might still work, or it might not, depending
on what objects it is using.

Peter Jamieson
http://tips.pjmsn.me.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top