Hi ML:
By far the best language to use for Macros in Office for Macintosh is
AppleScript. I STRONGLY urge you to give up on VBA right now. Microsoft
has officially announced that, due to the way it works, VBA cannot be
properly secured and so support for it is going to be withdrawn eventually.
That said, Word 98 through to Word 2004 support VBA version 5 (which is two
levels back from Word 2003's VBA).
So most templates coded in Windows Word 2000 will work unchanged in Word Mac
2001/X/2004. There are a few things that won't work at all on the Mac, in
any version of VBA.
You can get around those by using Compiler directives:
#If Mac = True then
..... Code that works on the Mac goes here
#Else
.... Code that works on the PC goes here
#End If
Note the hash signs before the If and Else statements. These cause the VBA
compiler to perform a "conditional compile", avoiding the compile error that
will otherwise happen if the code won't run on the version of Word in use.
The variable "Mac" becomes true if the platform is Word for Macintosh.
There are also version variables if you want to get really cunning, but I
wouldn't bother -- anything that will run on versions of Mac Word currently
in use will run on all of them.
Cheers
Thanks. What version of Mac Word 2004 is that equivalent too on the Windows
side?
Our current template, although not coded specifically to 2003 seems to have
issues with earlier versions.
--
Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.
John McGhie <
[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410