A quiet month with barely any work on the add-in done

I noticed this morning that it has been 23 days since I’d written anything on here.  Oops .. sorry! It’s just been one of those few kinds of weeks where real work takes place of my Word VBA hackery.

However, I haven’t been slacking (as per the previous post) for VBA work.  The Excel spreadsheet which I’d added a few extra bits to is in full use by our Service Centre staff.

The PowerPoint add-in has been enhanced and now includes various checks for the use of the correct company font – different fonts are used depending on whether it’s an internal, or external, slideshow.

My Word add-in has been ticking over after a colleague requested an additional few checks were added to the Custom Styles inspection code.  She’d come across a document which was a bit of a mix of our internal styles, plus copied & pasted text (with styles) from the client.  Whilst not quite on a “dog’s dinner” level of style mixes, it did need fixing.

So I’ve added Base Style, In Use? and Locked? parameters to the list box that appears.  Although I’m still in two minds about ‘In Use?’ as it’s not, it seems, to be read as a “is this style used in the current document?’ as I initially thought it would.

The Base Style option will probably be the most useful addition as it will show you the original style that any particular style was based on.  This should help you track down those wayward styles that have been imported during a copy & paste from another document.

All being well, the v1.81 of the add-in will be released at some point in early May.  There’s quite a few bug fixes and speed-ups but not everything I wanted to fix will be in it – mainly due to time constraints.

Coding in Excel & PowerPoint VBA for a change

Two bits of work came my way in the last couple of weeks and both require some VBA hackery at some level or other.  And neither require Word VBA, so this was a nice break.

One’s a simple ‘can you add a file export button for a range of cells’ in Excel.  That’s today’s task.  Already have the code (near enough) in another spreadsheet, so that shouldn’t take too long to implement.

The other was a bit trickier to achieve as it was my own suggestion to create this PowerPoint add-in.  Although it ended up as a series of routines wrapped up in an add-in 🙂

The basic premise is that quite a few people in the company do presentations.  The presentations include (quite often) the same set of slides, so normally the slideshow creators will take an existing slideshow, make a copy of it, then edit the slideshow to remove the slides they no longer want.

I went about it the other way around.  I created a simple template that enforces the look and feel. I then added some code (learning on the hoof as it were) to insert blocks of slides from ‘building blocks’ – which are just sets of external PowerPoint files.  These ‘building blocks’ are stored somewhere safe, so that no-one can muck about with them. Saves any embarrassment.

The end user just clicks one of the nine available buttons on the new menu bar and the ‘building blocks’ are inserted at the cursor position.  If they want all nine, they just click the nine buttons.  That’s got to be easier than messing around with copy and pasting slides in and out of other PowerPoint files 🙂

I also added a quick ‘delete any empty slides’ and ‘enforce the company font’ routines. This ensures that each slideshow generated doesn’t fall out of the remit of the company branding guidelines.

The only ‘oddity’ was when I came to implement it as a proper add-in.  Unlike Word, you can’t just drop it into your %APPDIR%\Microsoft\Word\Startup folder and it’s automatically loaded.  You have to save it off as a separate plug-in file, then install it via the Add-Ins options under File > Options.

Hey ho, it’s all part of the learning curve 🙂