Post #3 AI... A New Stone Age?
- guyrushton9
- Aug 18
- 2 min read
Updated: Aug 25

In the spirit of the age, I am experimenting with using AI to help me code better and faster. So far, the results are very mixed; working with VBA for Word has proven to be quite simple and very useful. My uses so far have been basic, mass formatting, fixing image sizes that sort of thing.
A good case came up at work the other day. I have a plugin for ABAQUS that generates large Word reports automatically. If the user is organised, then there is a space in the dialog to fill out the document number that it will be filed under. I usually forget. This leaves the document header with ‘00000000’ instead of the real document number. Not normally much of a problem, but, because of the way that the document is formatted there are lots of sections and you have to change the contents of the header at the start of each section manually.
Search and replace does not work in headers and footers. If, as I often do, you forget to change the author’s name and the title as well you can have a lot of tedious typing to do. The header is a table so simply copying does not work.
The answer is clearly a Word macro. However, I was not able to justify, to myself at least, spending an afternoon working out how to access the header, identify the right bit of content and replace it. Step in Copilot. A simple prompt, asking for it to create a macro, with a dialog to enter the text to be replaced and the new value and search all headers and footers in the document to replace one with the other. Five seconds thought and back came a handy piece of code, complete with installation instructions.
Now, I know this is not ground breaking stuff. It does suggest though that a very good use case for AI assistants is to create small, essentially disposable, one-off code snippets to automate a particular problem. It is the silicon age equivalent of our stone age forebears with a flint in their pocket and an immediate problem. Need a new arrowhead while out hunting? Tap, tap, done. AI at its simplest is the tech equivalent of flint knapping… maybe not perfect but functional and useful within limits.
I am going to try for some slightly bigger game automating ABAQUS functionality using AI, so far with very limited success, of which more later…
No code to download with this one - try it yourself!

Comments