Let’s Go Spelunking
by Jack Lyon
Spelunking is the recreational pastime of exploring caves. It’s a dark and dangerous hobby, an extreme sport for those who are confident in their ability to climb, navigate, and even swim (there’s usually water down there).
I try to avoid such hazards, but I’m not afraid to explore some of the deeper reaches of a computer program — Microsoft Word, for example. That’s one reason I know quite a bit about that particular program. Some of my friends, however, seem terrified of making a “mistake” on the computer. They want a concrete series of steps to follow in everything they do. “How can I make a word bold?” they ask. I reply:
- Double-click the word to select it.
- Click the “Bold” icon on the Ribbon.
Then they say, “Oh, that’s wonderful! Let me write that down for next time.”
There’s nothing inherently wrong with learning to use a computer in that way, and those who are comfortable with that should keep a big Microsoft Word reference book close at hand. These are probably the same people who would enjoy taking a guided tour of Timpanogos Cave, which is about an hour away from where I live.
But that’s a far cry from spelunking, and I doubt that any of the people on the tour discover something new.
So what kind of a person are you? Do you like someone to hold your hand along the well-marked trail? Or would you rather descend into the dark depths of the cavern with only a flashlight as your guide? Either way is fine, but sometimes it’s nice to get off the beaten path; you never know what you might find. As Henry David Thoreau once said, “Nature abhors a vacuum, and if I can only walk with sufficient carelessness I am sure to be filled.”
Want to learn something new about Word? Try exploring Word’s features that aren’t on any menu, the caverns that aren’t on the map. Here’s how:
- Press ALT+F8 to open the Macros dialog.
- Click the dropdown list next to “Macros in.”
- Select “Word Commands.”
Now, in the window under “Macro name,” you’ll see all of the commands available in Microsoft Word, whether they’re on the Ribbon or not. If you click one, you’ll see a description of its function under “Description,” at the bottom of the dialog. These descriptions are minimal at best, but along with the name of the command, they’ll give you some idea of what the command does. You can also click the “Run” button to run the command, which may give you even more insight. (Be sure to do this only with a junk document; you don’t want mess up an actual project.)
Let’s take a look. Don’t be afraid; I’ll be right behind you all the way.
So we’re scrolling through the list of Word commands in Word 2013, and what do we see? “CharacterRemoveStyle,” which, according to its description, “Clears character style from selection.” What?!? Does this mean it’s possible to remove a character style without affecting text-level formatting (such as italic)? If so, I sure didn’t know about it. Let’s find out. We type a junk sentence into a junk document:
This is a test to see what will happen.
We apply italic formatting to “test” and the character style “Emphasis” character style to “see”:
This is a test to see what will happen.
The formatting of those two words looks the same, but the formatting is not the same. Now let’s see if the “CharacterRemoveStyle” command works. We select the sentence, press ALT+F8, scroll down to “CharacterRemoveStyle,” and run it. Look at that! Our test sentence becomes:
This is a test to see what will happen.
The character style is gone, but the text-level formatting is still there. Neat!
Okay, one more, and then we’ll go back up to the surface. Down, down, down, scrolling, scrolling, scrolling. What’s this? “RestoreCharacterStyle.” I’ve never noticed that command before. The description says “Restores character style and removes direct formatting.” Could this be the inverse of the command we just finished exploring? Again we type our junk sentence and apply the same formatting as before:
This is a test to see what will happen.
Then we select the sentence and run the “RestoreCharacterStyle” command. Yes! The sentence now looks like this:
This is a test to see what will happen.
The text-level formatting is gone, but the character style remains!
But why does Microsoft say that this command restores a character style? If we remove the character style from our sentence and then run the command, does the character style come back? A quick experiment shows us that no, it doesn’t. Then why the odd name? I suspect that under the hood, Word is removing all character-level formatting but then restoring any formatting applied with a character style. It’s the equivalent of (1) identifying the character style, (2) pressing CTRL+SPACEBAR (to remove character-level formatting), and then (3) reapplying the character style — which means that the command was named from the programmer’s perspective rather than the user’s perspective. There’s a lot of stuff like that down here in the dark, and it’s part of what makes exploring so interesting.
Back up in the daylight, we assess our adventure, which I’d have to say has been a success. We’ve discovered two commands we didn’t know about before. Could they be useful in our actual editing work? Yes, indeed!
Personally, I enjoy crawling around down there in the bowels of Microsoft Word. Yes, it’s dark and it’s dirty, and sometimes I find something nasty under a rock. But I also make lots of interesting discoveries, and I nearly always learn something new.
How about you? Ready to go spelunking on your own? Have fun, and don’t forget your flashlight!
Jack Lyon (editor@editorium.com) owns and operates the Editorium, which provides macros and information to help editors and publishers do mundane tasks quickly and efficiently. He is the author of Microsoft Word for Publishing Professionals and of Macro Cookbook for Microsoft Word. Both books will help you learn more about macros and how to use them.
Any fear that I used to have of making computer mistakes came from my undergraduate programming days, when all computer work was done on a mainframe via dumb terminals in a public space lorded over by grumpy graduate students who seemed to enjoy humiliating people. I lived in fear of accidentally coding an infinite loop that would tie up the mainframe and bring the scowling grad student out of the office.
Any hope of help for newer Word for Mac users?
Hi, Sue.
My FileCleaner add-in is already available for Mac users with Word 2011:
http://www.editorium.com/14845.htm
I hope to have NoteStripper ready sometime next week.
Converting my programs for Word 2011 has been much more difficult than I anticipated, but I’m making progress. Thanks for asking!
I’m using Word 2013 with Windows 7. Alt+F8 does nothing as far as I can tell, at least nothing visible. Pressing Alt shows letters/numbers across the ribbon that can be used in addition to Alt as shortcuts (unfortunately, there isn’t one for the Macros icon). What’s wrong?
Please disregard my former comment. I figured out what’s wrong. 🙂
I am using Word 2010. I tried both CharacterRemoveStyle and RestoreCharacterStyle and they did not behave as you describe. CharacterRemoveStyle stripped all character styles without retaining any visual appearance, the same as Ctrl+Spacebar, and RestoreCharacterStyle stripped any direct formatting but did not apply any character styles (again, the same as Ctrl+Spacebar).
Is there a style setting somewhere that might be preventing these functions from working?
Also, I was surprised when I recorded a macro to get the code
Application.Run MacroName:=”CharacterRemoveStyle”
implying that this is not a native Word function in my Word background.
Hi, Robin.
You wrote:
“I tried both CharacterRemoveStyle and RestoreCharacterStyle and they did not behave as you describe. CharacterRemoveStyle stripped all character styles without retaining any visual appearance, the same as Ctrl+Spacebar, and RestoreCharacterStyle stripped any direct formatting but did not apply any character styles (again, the same as Ctrl+Spacebar).”
I think you may have misunderstood (or maybe I just wasn’t clear). If I have a document with a *mix* of character styles (e.g., emphasis) and direct formatting (e.g., italic), then CharacterRemoveStyle removes the character styles but leaves direct formatting intact. RestoreCharacterStyle removes the direct formatting but leaves character styles intact. It doesn’t convert direct formatting to character styles, if that’s what you’re thinking.
“Also, I was surprised when I recorded a macro to get the code
Application.Run MacroName:=”CharacterRemoveStyle
implying that this is not a native Word function in my Word background.”
That’s the kind of code you’ll get when you record any of Word’s built-in commands. Word treats those commands as if they were macros (which, in a way, they are).
Best wishes,
Jack Lyon
http://www.editorium.com
Hi Jack – thanks for taking the time to reply. In fact, I used exactly the example that you indicated – a mixture of some text with direct formatting and some styled with a character style. But CharacterRemoveStyle stripped the formatting from both the direct formating and the character style (i.e. exactly the same behavior as Ctrl+Spacebar, as I indicated in my original comment). This is very disappointing because, if I could get it to work as you describe, I would find it very useful.
I will try to fiddle around with my Advanced Options in Word to see whether something I have set there is interfering with this function. I tend to try to switch off as much of Word’s “automation” as I can, so this may be part of the problem.
Thanks – if I figure out what it is that is preventing this from working for me, I’ll let you know.
Yours
Robin