Converting Windows Word 2003 Template to Mac Word 2004?

M

ML

We currently have a custom template created in Word 2003 that makes
extensive use of custom forms, macros, VBA and related. We would like to
convert this to a Mac version as well with the same functionality. Having
no experience with Word on the Mac, what issues will be involved in such a
port? What macro features does the Mac version support and what language
does it use for macros?
 
J

Jim Gordon MVP

Hi ML,

By and large you should not have to make changes to templates made in
Word 2003. Most everything will work on the Mac as is.

That being said, there are things you can do that don't work across
platforms. Active-X is an open source technology (celebrating 10 years
as open source this year). In the 10 years since Active-X has been open
source, no one picked up the ball and ported this (often disparaged)
technology to the Mac. Therefore, any Active-X controls will simply not
work on the Mac. Use standard controls instead.

Mac Office supports Microsoft Visual Basic for Applications for macros,
but is limited to VBA version 5. Anything that is VB6 only will not
work. There is almost always a work-around to VB6 commands in VB5. If
you get stuck, just post a message in the newsgroups.

Mac Office also supports WordBasic and a Mac-only scripting langauge
called AppleScript.

If your templates have embedded fonts then those fonts will not be used
by Macs. You'll have to distribute the fonts to Mac users independently.

-Jim
 
M

ML

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

John McGhie [MVP - Word and Word Macintosh]

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
 
J

Jim Gordon MVP

Hi ML,

You can safely assume that if the code works only in 2003 then the code
uses commands, objects, or methods that are unique to that product.

It is much more cross-platform compatible to build in an earlier (say
2000 or 97) version in Windows or make the templates on a Mac.

As John McGhie has pointed out, Microsoft has announced that sooner or
later VBA will go away. Exactly when this will occur is uncertain. For
long-range planning purposes it is a good idea to keep this in mind.

John's advice to use AppleScript is good for Mac developers, but I tend
to think that building everything twice is wasteful. For those who plan
to make cross-platform solutions I think transitioning to C# might be
the best way to go for both Mac and Windows developers.

If you are interested in the very latest news about what is happening
with VBA, developer issues, Intel Macs, Mac Office, etc some Microsoft
employees have been blogging about these topics. A good place to start
is Rick Schaut's blog:
http://blogs.msdn.com/rick_schaut/

-Jim
 

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