Sometimes we’re stuck with some wonky paragraph formatting and we just want to start over with plain text.
There are several standard keyboard shortcuts in Microsoft Word that deal with formatting beyond just applying bold, italics, or styles to text. I wasn’t aware of them for a long time, so I thought I’d pass the information along.
Thanks for your interest
This content is part of a paid plan.
Why formatting?
Working with formatting in Microsoft Word can be a little aggravating at times in part because with can’t see the actual formatting “codes” Word uses.
For example, all paragraph formatting is invisibly stored in the paragraph mark. If you don’t believe that, copy some paragraph text without its paragraph marker and watch the paragraph (but not character) formatting disappear when you paste it somewhere else.
Yeah we can see some special characters using the Show/Hide button on the Home tab of the Ribbon, but we can’t directly manipulate anything other than just deleting the special characters.
We have to use the Word interface (or macros) to change things, but that’s where things can get messed up sometimes.
Removing formatting
When the formatting gets messed up badly enough, sometimes it’s better to just start over.
Don't tell anyone, but in the past, I took the annoying tactic of copying the offending text into a text editor like Notepad, which doesn’t allow formatted text, and then copying and pasting that text back into my Word document.
That's an example of how we all sometimes refuse to find or try better ways. Fortunately, I learned from my mistakes (mostly ... kind of ... somewhat).
Word for Windows
In Word for Windows, Control+Q removes the paragraph formatting and Control+Space removes any manual character formatting.
That was easy enough.
If you want more detailed control the following also applies to Word for Windows with appropriate interface adjustments.
Word for Mac
In Word for Mac, there are no standard keyboard shortcuts to remove formatting to my knowledge, but you can assign a keyboard shortcut of your own to the standard Word commands (see previous article).
Clear all formatting
The ClearAllFormatting command will remove manual formatting and all styles for both characters and paragraphs.
Selection required to remove character formatting
Any paragraph formatting or styles will be removed, but you have to select the relevant text if you want to remove any character formatting.
Clear specific formatting
If you want more targeted control, there are several other commands to handle specific types of formatting removal such as only manual formatting, only styles, only for paragraphs or characters, etc.
Clear character formatting gotcha
If you happen to use the CharacterClearFormatting command, the first character of the selection must be formatted text, or the command actually complains at you and doesn’t do anything to the remaining text in the selection even it includes character formatting.
You can get more detailed control with a macro such as automatically selecting the current paragraph, so the formatting removal works even when the text isn’t selected at first.
Improvements
Remove any formatting
While I understand the default behavior of having to select relevant text for the character formatting removal commands, my preferred behavior is to have the macro automatically select the current paragraph if I haven’t made a prior selection.
I can always make a specific selection before running the macro if I wish.
We use the Selection object below since there are no versions of these formatting removal commands for Ranges.
Check and maybe modify the initial selection
We check where there is a selection and select the current paragraph if not.
As we’ve mentioned this in previous articles, but we can do this using the Type property of the Selection.
For this macro, if there is no selection (i.e., the insertion point is just a blinking I-bar), we instead select the current paragraph before continuing.
The Selection Type constant wdSelectionIP checks whether the Selection is an “insertion point.”
There is another Selection Type constant, wdNoSelection, which seems more intuitive or even obvious here, but it doesn’t work as expected (at least based on what “no selection” would mean to a human using Word). Using wdSelectionIP seems to work more consistently and intuitively.
Selecting the paragraph
Now we select the current paragraph, if appropriate.
If there is a selection, we assume the user intended to make it and continue without changing anything.
Remove any formatting
The VBA command to remove all formatting from the selection is:
Oddly enough, this doesn’t have any issues with character formatting even though the ClearCharacterAllFormatting command complains (actually causes an error which is worse) if there is no character formatting in the selection.
Annoyance avoided
Since only the Selection object has access to the VBA formatting removal commands, this macros messes with the user’s position in the document if we expand the Selection to include the current paragraph.
Normally, I would use Ranges to avoid a side effect like this, but here we don’t have a choice.
I don’t like this quirk, so I prefer to store the initial position or selection and restore it at the end of the macro. There are a couple ways to do this. A convenient and easy one is to store the current Selection Range.
Remember we have to “Set” a Range since it contains more information than just a plain value.
At the end, one might think to just reverse this command to restore the starting position or selection, but it doesn’t work.
VBA doesn’t allow us to manually change the Selection’s Range property. I’m not sure why because it isn’t listed as read-only especially considering we can just do select it with the Range:
I suppose this is easier anyhow.
Final macro
Now put it all together.
I assigned this to Command+Control+Option+F10 in Word for Mac and Control-Alt-Shift+F10 in Windows.