Thought I’d do a post on automating tasks in Microsoft Word in ways that are useful to a writer. In particular, a post on my date-insertion macro. I thought of doing it as a sestina or a one-act play, but ultimately decided to stick to the standard blog post form. What about a gritty, Bukowski-style day-at-the-track reminiscence? That could be fun. But nope, a standard how-to, looking to earn what they call in the biz “SEO juice” kind of post.
Yessir, a shot of espresso, and let ‘er rip with the authorial sagacity. No stories here, boss, just the soup-to-nuts helpful stuff, real pragmatic-like.
1) First thing for it is to turn on the Developer’s toolbar. Here’s how. Way to go, now you can work with macros sanely.
2) Next—what will this thing do exactly, a macro? Is is something large, the opposite of micro?
It’ll insert the date and time into the body of your document. For me, I use it in my journal docs, those running scrap heaps of anything-goes, from rigor-mortis-inducing accounts of daily activities, to story ideas to drafts of emails and scene sketches on a lark and deeply personal laments and euphoric bouts of self-flagellation. Yes, the journal is a writer’s sketchbook and should be lawless, but I date every entry for the sake of cosmic record-keeping and sometimes aiding my ability to make sense of my life, when the need for hindsight arises.
Here’s a look at my custom Word ribbon showing the Date & Time macro, next to some other custom jobs.
The First Subhead, Finally
Next a tantalizing diversion. Here’s a screenshot video of a writer using my date-insertion macro, spliced side by side with a similar screenshot video showing a hapless writer manually moving his cursor down to the bottom of a page and inserting the date using passé and frankly laughable mouse-clicks. Ha! What a dunce! Notice the timecode at the bottom of the screen.
Wow, with my date-insertion macro, the sophisticated writer has the date and time of day inserted in the document in only 1.7 seconds! He’s off and running, writing flavorful anecdotes of his sumptuous life. Meanwhile, poor old “Manual Manny” scrolls down, down, down to get where he needs to be. Or maybe he’s using the arrow keys. Oh, brother. “Hey, Manny, manuscripts are due today. How’s yours coming? Ha, ha! That guy.”
Okay, so this just in. Minor staffing boondoggle with the editorial interns at BenObler.com. Upshot: no video. Maybe next budget cycle.
Next step is to record the macro. What does that even mean? Weep for a while if you need to. Then read on.
3) Recording a macro means performing the actions that will be automated. Whatever you do in Word until you hit stop will be repeated when you execute the macro. So Record >> File >> New > Stop Recording will create a new file every time.
Here’s where you find the Record button, on the Developer bar you enabled earlier.
Two things about this. One, go ahead and hit it. Notice, the menu itself changes to Stop Record. Interesting Fact: There is no other menu item in any Office product that changes completely when you click it. That is a fact.
What is this thing, some kind of mythical hydra? Don’t get hysterical. There’s more: the mouse also changes to the awesome (and fabled) Cassette Cursor.
The cassette cursor is a true relic. And a wily relic at that. It refuses to be captured in a screenshot! Develop the film, and it’s just not there, though I saw it plain as day. It’s the chupacabra of cursors!
Why the cassette? Who knows. For now, even in 2017, the cassette symbolizes recording, and that keeps geezers like me, born in 1972, from realizing our total obsolescence.
Now, before you go live with this sucker, a little planning of the steps you’re going to perform. You need to find where certain commands are on your keyboard and menu first. First step is going to the end of the document. Find the keyboard shortcut for this. On my Acer laptop, it’s
CTRL + Fn + Pg Dn
Heathen! Apostate! Speaking in tongues!
Mini lesson: on most keyboards, the small gibberish written in colored text on your special keys are commands accessed with the Function (Fn) key! A lot of computer users, it turns out, don’t know this. In the syntax above, I’m talking about depressing 3 keys at once!
Remember CTL + ALT + DEL?
4) Complicated, yes. But necessary. With macros, you cannot record mouse scrolling and cursor insertion. It needs to be an application command, so you need the keyboard command for this. We’ll call it “Go to End.” Find yours by opening a multi-page document, placing your cursor at the start, and finding the combination that takes you to the bottom of the last page.
5) Next, locate Date & Time insertion on your menu. For this you can click. In Word 2003, 2007, 2010, it’s on the Insert menu. Click it and decide on a date format.
Now Actually Recording
Now you’re ready—almost. When you hit record, a box comes up with some options. Type in a name for your macro. Then click to assign it to a button. When the bigger dialogue opens, just click OK. We’ll fine-tune this later. There’s no point adding anything to the Ribbon until you get the recording right.
Here’s the steps to do during record.
+ Record Macro
+ Go to End
+ Enter key
+ Tab key
+ Insert > Date & Time > [pick a date format]
+ Enter key
+ Tab key
+ Insert > Date & Time > [pick a time format]
+ Enter key
+ Tab key
+ Stop Recording
Running & Adding to Menu
You hit Stop Recording, and nothing happens. Yep. Word is like, So?
You want to test it before adding it to your toolbar. So put your cursor at the top of the doc. Then, on the Developer menu, click > Macros. Find the name you created and click > Run.
In an instant, you should have the date and time and the bottom of your document, and your cursor placed in a new paragraph, ready to go.
If it didn’t work, editing macros is for astrophysicists. Best bet is to delete and record again.
If it worked, move on to add to the ribbon. Either way, first, get a cookie. This has been a long process.
Customizing the Ribbon
This is the fun part. I don’t know what it is, maybe it’s just me, but I’m kind of into customization, specialization. I’m very particular that way. And I’m in Word often, so it’s worthwhile for me to put these functions ….
However, I am exhausted at this point. So let me know if you need help with this part. In general, you’re just right-clicking on your Ribbon, picking “Customize.” Phew.