in Editing

Removing Directly Applied Formatting

Last week I discussed the evils of directly applied formatting but didn't explain how to get rid of it. I know what you're going to say: "Just press CTRL + A to select all and then press CTRL + SPACE." That will remove it, all right. The problem is, it will also remove italics, bold, and other formatting that you want to *keep.*

For example, let's say you're editing a scholarly tome with acres and acres of footnotes. Nearly every one of those notes is going to cite a book or journal of some kind--with the title of each publication in italics (represented here with asterisks), like this:

39. G. B. Harrison, *The Profession of English* (New York: Anchor Books, 1967), p. 166.

But if you do the CTRL + SPACE thing, you're going to get this:

39. G. B. Harrison, The Profession of English (New York: Anchor Books, 1967), p. 166.

So what are you going to do? Go back and italicize everything by hand?

There *is* a better way. In general terms, here's the procedure:

1. Identify each kind of directly applied formatting you want to keep--italics, strikethrough, whatever. Maybe make a list.

2. Find and replace each kind of formatting with a unique code. For example, you might use |I| to indicate italic and |B| to indicate bold. (More on this in a minute.)

3. Press CTRL + A to select all and CTRL + SPACE to remove all directly applied formatting.

4. Find and replace your codes with the appropriate formatting.

Now let's get specific and say you're trying to preserve italics. Here's what you'd do:

1. Click Edit > Replace to open Word's Find and Replace dialog.

2. Leave the "Find What" box empty but press CTRL + I to specify italic formatting. The box will now say "Font: Italic" underneath.

3. In the "Replace With" box, enter this:

|I|^&|I|

That code in the middle, ^&, is the "Find What Text" wildcard, which tells Word to use whatever it *finds* (in this case, any italicized text) as the *replacement* between your italic codes. You can learn more about the "Find What Text" wildcard here:

http://www.topica.com/lists/editorium/read/message.html?mid=1703525514

4. Click the "Replace All" button. All of your italicized text will now be marked with codes, like this:

39. G. B. Harrison, |I|The Profession of English|I| (New York: Anchor Books, 1967), p. 166.

(If you wanted to preserve other kinds of formatting, such as bold, you'd repeat steps 1 through 4 here, with different codes for each kind of formatting.)

5. Press CTRL + A to select all and CTRL + SPACE to remove directly applied formatting. Woo-hoo! Pretty scary, no? (You did keep a backup, right?)

6. Click Edit > Replace to open Word's Find and Replace dialog.

7. In the "Find What" box, enter the formatting codes and the * wildcard (in parentheses) to represent any text between the codes, like this:

|I|(*)|I|

8. Click the "No Formatting" button. The "Font: Italic" notation will go away.

9. In the "Replace With" box, enter this:

1

That code tells Word to use any text it *finds* between italic codes as the *replacement* for the codes and the text between them. Clear as mud? You'll understand when you try it. You can learn more about the "Find What Expression" wildcard here:

http://www.topica.com/lists/editorium/read/message.html?mid=1706365638

10. With your cursor still in the "Replace With" box, press CTRL + I to specify italic formatting. The box will now say "Font: Italic" underneath.

11. Put a checkmark in the "Use wildcards" (or "Use pattern matching") box. You may need to click the "More" button before this is available.

12. Click the "Replace All" button. All of your italicized text will be restored to its former glory--and all of the directly applied formatting that you *didn't* want (such as 12-point Baskerville) will be gone!

If you need to do this kind of thing a lot, you can record the procedure in a macro that you can use over and over again. You can learn more about recording macros here:

http://www.topica.com/lists/editorium/read/message.html?mid=1706651129

http://www.topica.com/lists/editorium/read/message.html?mid=1706748016

http://www.topica.com/lists/editorium/read/message.html?mid=1706832239

Or, if you'd like a macro that will clean up directly applied formatting (but preserve character formatting such as italic) in a whole folder full of documents at the same time, you might try our FileCleaner program, which you can learn more about here:

http://www.editorium.com/14845.htm

_________________________________________

READERS WRITE

Last week Rich Shattenberg asked if it's possible to use wildcards in a custom spell-check dictionary. You can read his question here:

http://www.topica.com/lists/editorium/read/message.html?mid=1709799142

This week, expert Word-whacker Steve Hudson sent the definitive reply:

"No wildcards in dic entries. Badda badda boom."

Many thanks to Steve. It wasn't really the answer we wanted, but it's always good to know the facts.

_________________________________________

RESOURCES

The Office Letter

The Office Letter is a weekly email newsletter that provides a plethora of tips, tricks, tools, and techniques for using Microsoft Office. It's a *nice* publication, as you can see here:

http://www.officeletter.com/current.html

And hey, the current edition includes our NameSwapper macro!

The standard edition of The Office Letter is free. The premium edition includes access to all back issues, a fast search engine, and no advertising, all for just $12 a year. You can sign up for either edition here:

http://www.officeletter.com/sub/subscribe.html

Why not check it out?