The VBA Editor inside Word 2016 for Macs is *useless*!

I’m trying to port my Word Toolbox across to the Mac, using Word 2016, but failing at almost every step.

According to what I’ve read online, this version of the VBA Developer engine has (apparently) been gutted and re-created from scratch, but in doing so Microsoft have left out *loads* of features:

  • The basic menus and buttons that are in Office 2011 (based on screenshots I’ve seen) haven’t made it through to this version.
  • I can’t edit any user forms, but I can, for some reason, insert a module.
  • The ENIVRON variable, which gives me (on my PC) some 47 different variables that I can investigate .. is lowered to 15 on a Mac. Some I expect not to be available because that’s not how Macs work, but others really should be there.
  • Simple code that works perfectly on Windows, crashes on the Mac. E.g. looking for any Chart objects.
  • I can’t seem to close a form without causing a crash.
  • Others that I can’t remember as I’m trying to blank them from my mind …
  • I’ve read that this is just an “initial version” and a better version of the Developer mode will follow, but as a first version it’s a waste of space. Even one of our Mac-loving website developers took one look at the VBA editor and noticed how much was missing compared to what he remembered being in Office 2011’s VBA editor.

There’s not a great deal of help online, but there’s more than a fair few complaints aimed at Microsoft for what they’ve released. So, has anyone else tried their hand at either porting a PC Word add-in across to a Mac using Word 2016?

  • If so, did it work?
  • How easy was it to tweak the code?
  • How many #If Mac Then … #End If commands did you have to put in your code?

I’ll keep at it, but losing the will to contemplate having to rewrite 100% working Windows VBA code just to please the nuances of a half-baked attempt of a Mac version 🙁

Working on a Mac version this week (hopefully)

I don’t own a Mac and nor can I get VirtualPC to emulate one properly due to my PC using an AMD processor.

So my thanks to John Espirian for all of his help last Friday as I kept sending versions of the toolkit to him for testing on his Mac. Each new beta version had some minor tweaks applied which (in my head) should have enabled the toolkit to work. But he kept getting errors each time he ran it – the only thing that worked ‘out of the box’ was the Which Fonts? routine.

Apparently it’s my use of the GetSetting command in VBA as it works differently on a Mac as it does compared to Windows. Under Windows, your settings are stored in the Registry. On a Mac they are stored inside a file within the System area – well, that’s as far as I understand it.

I’m thankful that Ron de Bruin’s website has been very helpful in giving some hints and tips about how the ‘GetSetting’ command works differently on a Mac, compared to how it does under Windows and I should (fingers-crossed) be able to get it working fairly soon. This is because the Infrastructure department where I work are going to loan me a MacBook for a few days (along with Office 2016) so that I can try and work out why code breaks.

Possible Mac version (but don’t hold your breath!)

I don’t own a Mac machine. The last time I used one was when I worked on a helpdesk (between 1996-1997) when I was supporting John Lewis customers who had bought iMacs … sometimes just to match the kitchen wallpaper and other such excuses!

The other half has an old Macbook, but the likelihood of her handing it over to me whilst I get a Mac version up and running is fairly slim. That and she thinks I’d erase the pirates-themed game that is her lifeline when she’s bored.

So after a bit of Googling, I’ve found a tutorial on Lifehacker on how to get a Virtual Mac OS/X machine running on my new souped-up PC. If it works, and I can borrow the other half’s Office 2011, I’ll give it a go.