Will Using Word’s Macro Recorder Help You Learn Programming?

Robert Delwood
3 min readNov 14, 2020

--

Robert Delwood
Lead API Documentation Writer

I advocate that writers rely on themselves for creating tools. This is more than just theory for me. I’ve been working with writing groups for more than ten years, helping them automate their processes. I’m a Microsoft Office programmer, which means I write applications that use Office tools. I’m familiar with what’s possible. Tools are any form of automation that helps writers complete their tasks. We think of this from a high level, such as Madcap Flare or Microsoft Word. In reality, we need low-level tools. These are ones that help individual writers, such as reformatting text, validating syntax, or even as a one-time use tool.

I think that every writing group needs a programmer. That’s not going to happen though. The truth is, writers themselves have to learn automation. One aspect of Word is that it can be used to record a user’s actions and then replayed later to repeat the same actions. They can even be shared with others to help them. These recorded actions are called macros. To create the macro, Word and Excel have a built-in tool called the macro recorder. A macro recorder records your actions as you go and then saves the results as a completed macro. There’s no programming needed. The macro is a programming script that you can look at if you want, and even modify yourself. The act of modifying it is a step towards programming.

A question I am asked is if the Word macro recorder will help you learn programming?

The short answer is no, the recorder won’t help you learn programming.

But I don’t give short answers.

Some think you can record a macro, and use the resulting script to figure out how to program. You can’t. The script is of poor quality, at least in terms of programming. It’s the equivalent of brute-forcing the code. Some actions record far too much information and include parameters or options that seem almost unreasonable. That code has to be cleaned up as it often interferes with other code. Also, it doesn’t use looping (repeating a sequence several times), decision making (there are no If statements or other conditionals), there are no arrays, and some sequences can’t even be recorded. It’s a good script for what it’s designed to do but there’s nothing programming about it.

What it does do well, is offer insights into Word or Excel. If you’re learning Word programming, you can use it to record actions to see which commands are actually being called. That aspect alone is almost invaluable. There still times I just don’t know the commands. I use the macro recorder to see which ones are being used. I then copy the relevant portions and modify them as needed.

--

--

Robert Delwood

Programmer/writer/programmer-writer. A former NASA engineer, he ensured astronauts had clean underwear. Yet, it was always about API documentation & automation.