Sean's Technology and Writing Blog

Solve programming problems with Microsoft Office

26 July 2022

Photo of firework appear to come out of champagne bottle as cork is poppedYou might have heard of the law of the instrument: it’s the idea that to a man with a hammer, everything looks like a nail. Put another way, it’s easy to fall back on familiar tools instead of using the right tool for the job. I have this in mind as I confess that I have, on occasion, used Microsoft Office for programming.

When you’re writing Python or HTML, you’re basically writing text. Microsoft Word isn’t designed for coding, and so does not have the features you would expect of a proper development environment (such as code completion and syntax highlighting). It does, however, have some powerful features that development environments don’t (at least in my experience).

  • Version comparisons: I received a modified version of code from a reviewer, and used the Compare feature in Word to mark up the changes that had been made so I could quickly see them. If you need to do this a lot, Meld is probably a better option for managing versions and merges. In my case, this was a one-off, and Word was available and required zero installation and learning.

  • Mail merge: When creating the lists of room and object data for Mission Python, I started off organising the data in a spreadsheet, such as the room names and dimensions. I then used a mail merge to generate the Python code, which I could paste into my integrated development environment (IDE). Using mail merge saved a lot of rekeying (I could focus on the data and ignore the Python syntax). It was extremely efficient when I needed to make substantial map edits. I’ve also used this technique for building web interfaces, including my mood surfing experience Wild Mood Swings.

  • Saving HTML from Word: This is mostly useful if you have a document that’s already in a Word-friendly format that you need to convert to HTML. You can use Save As to save your document as a filtered HTML file. The results aren’t brilliant. In particular, bullets are not syntactically correct, bold text is coded with the HTML bold tag instead of the strong tag, and there’s a lot of custom Word CSS at the top of the document. But, if you’re writing a long web page, Word can take care of the headings, links, and paragraph breaks for you, and give you some reasonable HTML to edit.

  • Printing. Visual Studio Code is a useful free code editor, but it doesn’t allow you to print your code. I still find paper useful for reviewing and debugging long programs, so I copy the code from Visual Studio Code and paste it into Word for printing. When I copy from Visual Studio Code, the syntax highlighting copies with it, so I get better results than I do by opening the file in Word.

I’m sure there must be better development environments available than I am using. As a hobbyist programmer with a limited budget, though, I’m happy to use free and cheap tools and plug the gaps with Microsoft Office when it helps. It might not be the best tool for the job, but for most people it’s already installed and it’s easy to use. Sometimes the wrong tool does the job just right.

* For powerful time-saving ideas, see my latest book 100 Top Tips: Microsoft Excel. For an introduction to mail merge, see Microsoft Office for the Older and Wiser. It’s out of print now, but still available on Kindle and second hand. It's also widely stocked in UK libraries.

Image credit: Markus Spiske at Unsplash. Thank you, Markus!

Permanent link for this post | Blog Home | Website Home


Create digital art on the Raspberry Pi

04 July 2022

A gritty image showing a shadow of someone at a window, with an overlaid X-shaped cross. The new issue of The MagPi is out now, including my four-page tutorial on ArtEvolver, an ever-changing digital artwork I've created. ArtEvolver blends together images, constantly changing their transparency. Each time you look at it, you'll see a fresh mix of the images.

For my installation, I've curated a collection of 1,000 images, but you can use maybe 10 to try it out, and get good results with 100 images. Some of the images are my own, and some are from online libraries. I sought out textures (stone, paper, oil paints) and colour gradients, as well as interesting abstract shapes. There is an element of trial and error. Some images didn't work as well as I hoped for, and so I removed them again.

I'm really happy with how this project came out. From a technical point of view, the key was working out how to index all the images in Python, which makes it scalable because you can easily add and remove images without changing code. From a reader's point of view, the project has a low barrier to entry while offering potential for self expression. The code is documented but can just be cut and pasted, and customisation is simply a question of sourcing and curating images. The finished installation looks great mounted in a picture frame, but you can run it on the Raspberry Pi desktop without any additional hardware. Special effects can be added to the base images using ImageMagick, as explained in the previous issue of The Magpi. I hope that readers will create their own ArtEvolver installations.

You can download the ArtEvolver code, and see some more sample images here.

The MagPi is available for download as a free PDF here. You can support the magazine by donating when you download, by buying a copy in your newsagent, or by subscribing.

For more Raspberry Pi resources, visit my Raspberry Pi tutorials hub here.

Permanent link for this post | Blog Home | Website Home


Dip into the blog archive

June 2005 | September 2005 | January 2006 | March 2006 | April 2006 | May 2006 | June 2006 | July 2006 | August 2006 | September 2006 | October 2006 | November 2006 | December 2006 | February 2007 | March 2007 | April 2007 | May 2007 | June 2007 | July 2007 | August 2007 | September 2007 | October 2007 | November 2007 | December 2007 | January 2008 | February 2008 | March 2008 | April 2008 | May 2008 | June 2008 | July 2008 | August 2008 | September 2008 | October 2008 | November 2008 | December 2008 | January 2009 | February 2009 | March 2009 | April 2009 | May 2009 | June 2009 | July 2009 | August 2009 | September 2009 | October 2009 | November 2009 | December 2009 | January 2010 | February 2010 | March 2010 | April 2010 | May 2010 | June 2010 | August 2010 | September 2010 | October 2010 | November 2010 | December 2010 | March 2011 | April 2011 | May 2011 | June 2011 | July 2011 | August 2011 | September 2011 | October 2011 | November 2011 | December 2011 | January 2012 | February 2012 | March 2012 | June 2012 | July 2012 | August 2012 | September 2012 | October 2012 | December 2012 | January 2013 | February 2013 | March 2013 | April 2013 | June 2013 | July 2013 | August 2013 | September 2013 | October 2013 | November 2013 | December 2013 | January 2014 | February 2014 | March 2014 | April 2014 | May 2014 | June 2014 | July 2014 | August 2014 | September 2014 | October 2014 | November 2014 | December 2014 | January 2015 | February 2015 | March 2015 | April 2015 | May 2015 | June 2015 | September 2015 | October 2015 | December 2015 | January 2016 | February 2016 | March 2016 | May 2016 | July 2016 | August 2016 | September 2016 | October 2016 | November 2016 | December 2016 | January 2017 | July 2017 | August 2017 | October 2017 | November 2017 | January 2018 | February 2018 | August 2018 | October 2018 | November 2018 | December 2018 | January 2019 | March 2019 | June 2019 | August 2019 | September 2019 | October 2019 | January 2020 | February 2020 | March 2020 | April 2020 | May 2020 | June 2020 | September 2020 | October 2020 | December 2020 | January 2021 | February 2021 | May 2021 | June 2021 | October 2021 | November 2021 | December 2021 | January 2022 | February 2022 | March 2022 | May 2022 | July 2022 | Top of this page | RSS


© Sean McManus. All rights reserved.

Visit for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!

Discover my latest books

100 Top Tips: Microsoft Excel

100 Top Tips: Microsoft Excel

Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.

Scratch Programming in Easy Steps

Scratch Programming IES

This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.

Mission Python book

Mission Python

Code a space adventure game in this Python programming book published by No Starch Press.

Cool Scratch Projects in Easy Steps book

Cool Scratch Projects in Easy Steps

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

Raspberry Pi For Dummies

Raspberry Pi For Dummies

Set up your Raspberry Pi, then learn how to use the Linux command line, Scratch, Python, Sonic Pi, Minecraft and electronics projects with it.



In this entertaining techno-thriller, Sean McManus takes a slice through the music industry: from the boardroom to the stage; from the studio to the record fair.

Scratch Homeschooling resources

Scratch cat with balloons invites you to visit my Scratch resources

Sean's Scratch Resources

Tips, tutorials and free book chapters for Scratch, a coding language widely used in schools.

Walking astronaut from Mission Python book Top | Search | Help | Privacy | Access Keys | Contact me
Home | Blog | Copywriting Services | Books | Free book chapters | Articles | Music | Photos | Games | Shop | About