Friday, 28 June 2019

Building Blocks for Repeatable Text Blacks, with Macros

Found some useful content today on the web today to help me with the creation of Word.  I've been looking at various ways on trying to simplify Word document creation and reuse text from other documents I've created.  There's some good Python stuff out there that allows you to do it via the browser, but my Python isn't good enough.  Lots of searching keeps on bringing me back to the same answer, in the end I keep ending up with Microsoft Word Building Blocks.

I've managed to create to create Building Blocks that include diagrams and tables and use the Building Blocks Organiser (under Quick Parts) to save them as blocks of text.  I've used the Gallery and Category options to organise these.  I found though it's still a hassle to insert them, so I looked at what options I had.

First off I've created a new Tab in MS Word called 'MyText', my plan was to insert my custom text from there.  To do this:

  • Right click on the Ribbon and select "Customize the Ribbon..."
  • Select "New Tab" and give it a name (by right clicking on the tab just created)
  • Select "New Group" from within that Tab, again giving it a name

I then assigned a macro to text blocks, and associated this macro with a button on the new Tab.  This means I can select and insert my text blocks.  I used the Record Macro option in the Developer Tab to do this.  To add a button to my new Tab I went to "Customize the Ribbon..."again but selected Macros in the "Choose commands from:" drop down menu.

Once it appeared in the Tab I changed the name of it to make it more meaningful.

This might get unweildy if I get lots of text blocks, if those I might go back to using the Building Block Organiser, but this is a good start for me.  And this might seem a lot of effort, but if I'm going to be doing lots of documents with similar content then it'll be a lot quicker in the long run.

Ideally I'd like to create a UserForm whereby I select the text blocks and it auto-generates the document.  That's a work in progress and I need to work on my Visual Basic skills.

With all some pretty pictures and more detail later, but this is just a reminder to myself for later reference...

Wednesday, 15 July 2015

Motivation to Move

So it's been a long time but I'm back trying to give blogging a try again.  This time around though it'll be less about work type stuff and more about my feeble attempts at getting fit.  Part of the motivation behind this is a book I'm not long finished Running and Stuff...

Running and Stuff is an autobiography about James Adams who initially worries about running a marathon, to doing ultra marathons, to running across the USA.  There's no chance of me doing that but it is an interesting example of what's possible.  What he does suggest though is that through sharing his progress with others through blogging it has helped his motivation to do more and more, which has led to me giving it a try.

So my Sunday night run was the following, with Strava used for tracking progress.  It should be noted that this is just the third time I've ran 10km, so while my time ain't great, it's better than the last 2 times.  And it should be noted that I'm over 6ft tall and weigh 96kgs, so I'm not some wee whippet!

The run was slow and methodical, with a few bits of walking but not as many as I expected- which is good.  One highlight of the run was seeing a couple of deer heading off into the woods. It's strange though that about a year ago I was mountain biking the same route and thought it was a good workout.  I even saw someone out running at the later stages and I was impressed they'd made it that far, now I'm even running it!

My current running goal is to get my time down to 1h, 7mins less than my current time. While this doesn't sound a lot but it's a fair increase in my pace so I don't expect to drop that time quickly.

It was another book I've recently read that's got me motivated again. Ranulph Fiennes has done lots in his time and it's amasing what he's done in his time.  The book, Mad, Bad and Dangerous to Know, covers a few highlights in his life and worth a read, but his simple fitness mantra is something I'm aiming for.  Basically he suggests that to stay fit, even at his age, you need to run 2 hours three times a week.  So my first goal was running for one hour and then increasing it from there.  At the moment I'm alternating between cycling and running so it'll be a while before I get to running 2 hours, never mind doing it three times a week!  But having been running on Sunday, mountain biking on Tuesday and cycling to/from work today at least I'm more active.

But I am writing this blog post with a beer in hand so somethings don't change that much...

Friday, 17 May 2013

Off Topic

This is a post about something different, just to check my off topic label

Free Premiership with BT

"BT promises free Premier League football on TV for the first time"

Wednesday, 8 May 2013

"Liberty Media"

Liberty Global has just bought Virgin Media to expand their influence in the UK. Moving the HQ to the UK shows they're serious about their venture but what will it mean for Virgin Media and their business to business arm in the UK?

4G Bidding Begins

OFCOM have announced that the bidding wars have begun! Yes, 4G licences are now up for grabs. In a similar fashion to the 3G spectrum allocation a few years ago, the UK Government will be hoping to make a bunch of money out of this auction.