Minor bug-fixes – new beta available (v1.86d)

After last week’s debacle where I thought it would be easy to port across my toolbox to the Mac, it did have a good ending. I found quite a few interface bugs that, for some unknown reason, showed up on the Mac more than they did on the Windows version. It sounds odd, but it’s true.

Maybe the Windows VBA Editor is more forgiving, but the Mac version just kept on spitting out different ‘errors’ that I hadn’t spotted before. So I’ve been busy and updating the beta version to v1.86d.

I’ve also been adding some extra features to the Toolbox > Information tab. After a bit of jiggery-pokery and moving the fields around, I created some space to include some new fields and tweaked the code behind some others. Here’s the new version of the form:

releasev1-86dpreview

Paper Height and Paper Width have been added, so you can see them updated as you scroll through each section. I’ve also moved the Odd/Even Header/Footer across from the ‘Additional Information’ form into the ‘Section breakdown’ area as it can change in each section. Why I didn’t twig that ages ago when I first added that field, I’ve no idea. But it’s in the right place now. I’ve changed both the Odd/Even Header/Footer and Different 1st Page fields to turn red if they are switched on in a section.

The final tweak (in this beta) is that you can now swap the value for the Different 1st page whilst scrolling through your document. This is a bit easier than seeing the value in my Toolbox, going back to Word, double-clicking on the header or footer, then changing the value and continuing 🙂

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.