Blog > Visual Basic macros do not work in Office 2008 for Mac
Apple's move to Intel processors has been a welcome change to the platform and has once again swung their pendulum back in the Innovator direction. The launch of the MacBook Air this week shows off Apple's real strength: whether you love it or hate it, you have to respect the engineering that goes into building a laptop so small and thin that it fits in an envelope. The release of Microsoft's Mac Office 2008, also announced at MacWorld, caught my attention because Office is the last app I run which had not been ported to the Intel chipset.
The existence of Office on the Mac platform has always been a bit of quandary for Microsoft. On the one hand, they sell a lot of copies and make a good chunk of revenue on it. On the other hand, they sell it to people who don't buy Windows (unless they're going to run it in Parallels or Fusion) and are therefore helping to support the existence of a platform which directly competes with two of their primary money makers (Windows and Office for Windows). There was actually a point in history, back in the dark days of 1997, when Microsoft invested $150m in Apple and pledged to continue to develop versions of Office (and InternetExplorer!) for Mac OS — a move which may well have saved Apple's bacon. Fast forward 10 years and we have a new release of Office, so what's changed?
On the surface, this is a great update. Lots of thought has gone into the UI, which resembles a Mac OS native version of the Ribbon seen in Office 2007 for Windows. It's Intel native, which makes it much faster on modern Macs than Office 2004 was (mostly because it's no longer running in the Rosetta emulation layer). What's not to like? Well, there's one thing. It's a small thing when you read it in a long list of changes, but when you actually stop to think about it, it's not such a little footnote.
Microsoft Office 2008 for Mac OS no longer supports Visual Basic for Applications Macros. VBA has been the standard Macro language for Office releases on both Mac OS and Windows for a long, long time and there are probably millions of Office documents out there that have embedded macros. I regularly use two such documents, an Excel spreadsheet which we built internally and which helps us calculate accurate estimates for clients, and a Word document which was provided to me for a project I'm working on and which I have to use to complete my work. Opening our Costing Workbook in Excel gives the following error dialog:

The first time it came up, I didn't read it properly and thought it was the old security warning that Excel used to give when opening a document with macros in it. It was only on the second pass that I realized what I was seeing: we will never be able to use our Costing Workbook again. This is a little more insidious in the project document I have to use, as it opens without a warning but none of the built-in functions and buttons do anything. Clicking on the "Learn more about macros and Office for Mac" shows a Help window with the following contents:
Cause: Office 2008 for Mac cannot run Visual Basic macros or load add-ins that contain Visual Basic macros.
Solution: Keep the macro in the file.
Solution: Remove the macro from the file.
Solution: Save the macro in another macro-enabled file format.
Solution: Create a new macro by using AppleScript.
The first three are just solutions which allow you to keep the macros from getting destroyed when the file is saved in Office 2008 format. The last one is the real kicker: the only actual solution is to recreate your macros in AppleScript format. Kudos to Microsoft for beefing up AppleScript support for the suite (and it does look pretty thorough), but what they're basically saying is that you can no longer interop with your Windows colleagues and you have to recreate any macros you had in a completely new language. You may find yourself scratching your head at this point, much as I was when I made this discovery. Why would they do such a seemingly stupid thing? Erik Schwiebert ("Schwieb"), a member of the Mac team, explains in an excellent blog post Saying Goodbye to Visual Basic (have I mentioned how much I love Microsoft's approach to corporate blogging? No? It's awesome. Everyone should learn from them). I completely sympathize with Erik's description of their plight and I agree that a two year delay would have been unacceptable, but I also think this decisions has some very serious consequences for Apple's potential in the corporate market.
We basically run Office only because our clients do. If we had our choice, we'd probably run Pages for word processing, we would definitely run Keynote for presentations (and I use it for any of mine already), and would be stumped to replace Excel (Numbers is a nice start but it's a long way from ready). If we felt that there were other applications out there which would flawlessly handle our clients' documents, we'd probably switch today (we've tried NeoOffice and OpenOffice with mixed results — suggest alternatives in the comments). We're a small shop though, and we get to set our own IT direction. Many of our colleagues work in large organizations who have IT departments which have been actively hostile toward Macs until recently and have only just started to come around (if they have at all). A big reason for that change has been Office, since Mac users can work seamlessly with their Windows colleagues (particularly in an Exchange environment using Entourage). If you work in an organization large enough to have an IT department, there's a pretty good chance that your company has also got some complex documents with macros in them (likely in Excel, which sees a lot more scripting than Word). The very rock and hard place described by Erik is about to crush your chances of getting a Mac on your desk, since any new Mac will be Intel-based and any new license of Office will be 2008 and now you'll be back into no-interop land. I'm not the only one who finds this so disheartening: in an opinion piece published in Macworld way back in December 2006 (when Microsoft first announced that they were removing VBA support), Rob Griffiths said:
Microsoft Office isn't among the apps that will run natively on Intel-based Macs, and it won't be until the latter half of 2007, according to media reports. But when it does ship, Office will apparently be missing a feature so vital to cross-platform compatibility that I believe it will be the beginning of the end for the Mac version of the productivity suite.
He also points to a thread on Ars Technica, which includes 3 pages of angry feedback from people who will be seriously affected by this decision. I feel for the Microsoft Mac Business Unit (MacBU) team members who had to make this decision, even though I'm sure that ditching VB's ten year old implementation was a weight off their shoulders. Unfortunately for me, and for many of you, it was really just a transfer of weight onto our shoulders.
So, if you're feeling that weight, MacTech Magazine published their Moving from Microsoft Office VBA to AppleScript: MacTech's Guide to Making the Transition guide in their April 2007 issue (which is now entirely available online), which I recommend as a fantastic starting point. I agree with their introduction in that there is an advantage for Mac users who take the time to learn AppleScript: it's the scripting language for the whole platform so you can easily build scripts which integrate Office into other apps, and you'll know how to script non-Office things as well. I actually do a fair bit of AppleScripting from time to time and have made some great little scripts (particularly Copy Path, which copies the path to the current Finder window onto the Clipboard), and I encourage Mac users with a programming bent to learn it. I'm just not sure you should be forced to do so in order to keep using your own documents.
Comments
Post a New Comment
Please note that comments are moderated to prevent abuse of the comment system and will only appear after they have been approved by the author of this post. Use the "View Source" mode to edit HTML directly if you're into that kind of thing. We might not approve posts that are offensive or really off-topic, and we will definitely delete spam (and place nasty, nasty curses on the spammers).

