Reviewing Revisions with the Keyboard

Last week's article on paperless proofreading explained how to use Word's Reviewing toolbar to review revisions in a merged document. It's a great tool except for one thing: the need to locate and click those tiny toolbar buttons for every revision you want to find, accept, or reject. Wouldn't it be nice to use the same commands from the keyboard? Here's how:

1. Click Tools > Customize > Commands > Keyboard.

2. In the Categories window, find and click "All Commands."

3. In the Commands window, click "ToolsRevisionMarksNext."

4. Put your cursor in the box labeled "Press new shortcut key."

5. Press the keyboard combination you want to use. For example, for the "Next Change" command (ToolsRevisionMarksNext), you could use ALT + SHIFT + N.

6. Click the "Assign" button.

7. Repeat steps 1 through 6 for the following commands:

ToolsRevisionMarksPrev ("Previous Change," ALT + SHIFT + P)

ToolsRevisionMarksAccept ("Accept Change," ALT + SHIFT + A)

ToolsRevisionMarksReject ("Reject Change," ALT + SHIFT + R)

8. Click the "Close" button.

Now by pressing the key combinations you specified, you'll be able to review, accept, and reject changes just as if you were using the toolbar buttons--but without the aggravation. As a bonus, you now know how to assign commands to keyboard combinations.

_________________________________________

READERS WRITE

I received some great messages from readers in response to last week's article.

Anna Marshall wrote:

Thanks for another great Editorium Update! I enjoyed very much your proofreading sequence. It's essentially what I use, aided by your Editor's ToolKit and FileCleaner tools.

One step you might add to your sequence is viewing the text differently by changing the background color, using columns, or employing one of the other methods you listed in previous newsletters:

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

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

Although these methods don't completely substitute for a review of the printed document (for me), they get darn close.

Also, your sequence doesn't acknowledge the importance of interplay between text and images in the final document. I've never seen text stand with no changes once imported into a layout. Frustrating as it is to document managers and designers, the layout generally spotlights a need for minor text adjustments if not content adjustments (e.g., certain content commands more visual emphasis than intended).

Some designers I know import a rough draft of the text into the layout to nail text-design interplay issues up front, so that when final text comes through, it gets imported into a final layout, and there should be few surprises.

Brad Hurley wrote:

Thanks for the paperless proofreading tips--I used the same procedure when working on magazine articles that were reviewed by several outside experts and editors.

Here's another tip that might be useful to some of your readers: Recently, I edited a government publication that was put through an unplanned multi-agency review after the report had already been laid out in Quark. The process lasted several months, and there were extensive revisions. I saved a ton of time and hassle by buying a copy of Quark CopyDesk, which allowed me to make direct edits to the text in the Quark file. No need to give the designer marked-up hard copies, and CopyDesk protects the layout so the artist needn't worry about the editor messing up the design. Furthermore, CopyDesk lets you easily extract the text as a Word file, which allowed me to track all the changes I'd made: I extracted the text from the original CopyDesk file, and then when the revisions were complete I asked the designer to send me a new CopyDesk file. I extracted the text from the new file into another Word document and used Word's "Compare Documents" feature to reveal the differences between the two versions.

For me the real value of CopyDesk wasn't so much fitting the copy to the layout, but being able to make text edits directly to the Quark file without having to fax marked-up copy or e-mailing a commented-up PDF to the graphic designer. It reduces the opportunity for error and saves a lot of time.

Steve Hudson wrote:

Automated processes? Live on 'em 🙂 I generally use all of these:

Reapply all styles

Spell / grammar check

check for bad bookmarks (multi-paragraphs)

bookmark all headings ready for x-reffing

remove all un-reffed bookmarks

phrase finder to check consistent vocab use

Set page layouts

report on picture names, compare against directory

find slang words

strip bad spacing

prep for online use (cleans up tables, bullets and the like)

apply autocorrections

apply casing to headings

Anna Marshall wrote with the following question: "Here's a problem for you. Do you or any of your readers have a macro that will take comments out of the comments area and paste them into the running text of a document?"

If you, gentle reader, have such a macro that you'd be willing to share, please let me know.

Thanks to all for their comments and suggestions.

_________________________________________

RESOURCES

Interested in a program designed specifically to handle revision control? You might want to try ComponentSoftware RCS, which can be used at no charge for single users. Here's what the Web site says:

"ComponentSoftware RCS (CS-RCS) is a powerful, inexpensive revision control system for Windows. Based on the widely used GNU RCS, it is fully integrated with the Windows Explorer, providing the most intuitive and easy-to-use configuration management and change control solution in the market. CS-RCS supports multi- platform workgroups, making it the ideal solution for sites that share common files on UNIX and Windows platforms.

"CS-RCS handles all types of documents including program files, project files, resource files, HTML documents, MS-Word documents, pictures and drawings.

"CS-RCS can use any file server or local drive to store the archive repository. Network connection to the archive repository can be LAN, corporate wide-area network (WAN), dial-in connection (RAS) and the Internet.

"CS-RCS Basic is used for general-purpose document revision management as well as for entry-level software configuration management. CS-RCS Pro includes advanced features needed for complex software and web development projects."

You can learn more (and try the program) here:

http://www.componentsoftware.com/Products/RCS/index.htm

Posted in Proofreading | Leave a comment

Paperless Proofreading

I started in the publishing business as a proofreader, reading type set in hot metal on a Linotype machine. I'd compare the type against the edited manuscript and mark any discrepancies. Then back the type would go for corrections, with additional cycles of proofreading and corrections until the type was error free.

Now the Linotype machine is gone. My electronic text is imported into QuarkXPress, and the number of errors on galleys is vastly lower than in the old days when everything had to be rekeyed by hand. Proofreaders still look over the typeset galleys for errors the editor may have missed as well as widows, orphans, and bad line breaks. But then we're right back into the old correction cycle. Isn't there a way to make it go away?

It turns out that there is. I call it "paperless proofreading." The idea is that proofreading should be done on the edited Word document *before* typesetting takes place. Some of the advantages are:

* No paper is involved, eliminating printing costs, copying costs, postage costs, and time in transit.

* Editors can merge the proofread documents and then use Word's reviewing tools to jump quickly to each correction and accept or reject it. This decreases the time needed to reconcile galleys.

* The corrected manuscript goes directly into typesetting, eliminating the correction cycle after proofreading.

Disadvantages include:

* The author and proofreaders must have a computer, Microsoft Word, and the ability to send and receive email. However, if they don't have Microsoft Word, they can download and install the free OpenOffice.org software and use its Write module to make and track their corrections. You can learn more here:

http://www.openoffice.org

* There will need to be a separate proofreading for typography (bad breaks, etc.) and an accompanying correction cycle after the galleys have been typeset.

If you'd like to try this method of proofreading, here are the steps you'll need to follow:

PREPARING THE MANUSCRIPT

1. Edit your manuscript in Microsoft Word.

2. When you're ready to send the manuscript out for proofreading, make any tracked revisions permanent (so you don't have to review them later along with the proofreaders' revisions). Then save the manuscript with a new name, such as "My Galleys.doc."

3. "Protect" the manuscript so the proofreaders can't change it without revisions being tracked. To do so, click Tools > Protect Document > Tracked changes. I'd recommend using a password here, but write it down so you don't forget it. You might want to use a password that's the same from job to job or even for all your editors. Just don't give the password to authors or proofreaders. Word will ask for the password twice. Click OK and then save the document.

4. Send the manuscript to your author and proofreaders as an email attachment. In the message, include your name, phone number, and proofreading deadline along with any special instructions. (Since they now have access to Word's Find and Replace feature, you should probably instruct them to *call you* before using the feature to make extensive changes. If you've already done a spell check, you might also mention that.) Part of your instructions should be to delete and insert whole words, not just modify existing words. That will make reviewing the changes much easier later on.

The author and proofreaders will need to save the document to their hard drive, open it in Word, make their corrections in Microsoft Word (*not* WordPerfect, which doesn't handle revision tracking well), save the document, and return the document as an email attachment.

REVIEWING THE MANUSCRIPT

1. After the proofreading has been done and sent back to you, save the documents from the author and the proofreaders to your hard drive, being careful to give each one a unique name so they don't overwrite each other ("My Galleys Author.doc," "My Galleys Proofer 1.doc," "My Galleys Proofer 2.doc").

2. Open the author's copy of the proofread document to be your reconciled version.

3. Make sure revisions are showing (Tools > Track Changes > Highlight changes on screen) and note the color of the revisions. After you've merged the other documents into this one, you may want to give revisions in that color more weight because they were made by the author.

4. Open the document and merge each of the others into it by clicking Tools > Merge Documents.

5. "Unprotect" the document by clicking Tools > Unprotect Document and entering the password.

6. Save the document with a new name, such as "My Galleys Reconciled.doc."

7. Review the corrections and accept or reject them as needed. There are two different tools you can use to do this:

* The Accept or Reject Changes dialog.

* The Reviewing toolbar.

If you have Word 2002, the Accept or Reject Changes dialog will not be available--unless you know the secret way to get it back: Click Tools > Macro > Macros > Macros in: > Word commands > ToolsReviewRevisions > Run. Note that you can put this little beauty on a menu or toolbar for easy access:

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

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

You can also move your mouse cursor over a correction to show who made it (as long as you've turned on Tools > Options > View > Screen Tips).

USING THE ACCEPT OR REJECT CHANGES DIALOG

1. Click Tools > Track Changes > Accept or Reject Changes.

2. Click the Find button (or press F) to find the next correction.

3. Click the Accept button (or press A) to accept the correction. Click the Reject button (or press R) to reject it. Word will automatically go to the next correction. This has the advantage of speed but the disadvantage of not being able to review the text around the correction.

If you inadvertently reject a correction that you wanted to keep, click the Undo button to undo the rejection.

USING THE REVIEWING TOOLBAR

1. Click View > Toolbars > Reviewing. In the middle of the toolbar you'll notice two buttons with blue arrows on them, one pointing left and the other right. Click the button with the right-arrow to go to the next correction. Click the button with the left-arrow to go to the previous correction.

2. To the right of these two arrows are two more arrows, one with a checkmark and the other with an X. Click the one with the checkmark to accept the correction. Click the one with the X to reject (or stet) it. Word will *not* automatically go to the next correction. This is an advantage if you want to double-check the text around the correction but a disadvantage if you need to move quickly.

If you inadvertently reject a correction that you wanted to keep, press CTRL + Z to undo the rejection.

In Word 2002, you can limit your review to corrections by a certain reviewer. On the Reviewing toolbar, click Show. Then click "Reviewers" and clear the checkboxes except those next to the name of the reviewer whose changes you want to review. You'll find more information on tracking revisions in Word 2002 here:

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

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

After you've finished reviewing corrections, save the manuscript and send it to typesetting as usual.

Ah, but there'll still be a correction cycle because you'll want to review the typography in the typeset document. Well then, how about typesetting the document in Microsoft Word *before* proofreading takes place? That would eliminate the correction cycle entirely! You can learn more about typesetting in Word here:

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

Have you figured out some clever tips for streamlining the electronic production process? If so, I'd really like to hear about them, or just about your process in general. Please write to me here: mailto:editor [at symbol] editorium.com.

_________________________________________

READERS WRITE

Seth R. Beckerman wrote:

There is a moderate list of web resources on the Council of Science Editors website:

http://www.councilscienceeditors.org/services_references.shtml

Alice Falk wrote:

The best place I've found for locating online works generally, not just references, is "The On-Line Books Page":

http://digital.library.upenn.edu/books/

There are online classical texts on the Perseus site:

http://www.perseus.tufts.edu/cache/perscoll_Greco-Roman.html

The site has fantastic search capabilities--look for a phrase in all of Plato's works at once! switch back and forth between Greek and English!

Thanks to Seth and Alice for these useful resources.

_________________________________________

RESOURCES

Do you publish critical editions of classic texts? Would you welcome an easier way of handling the complex typesetting and formatting associated with margin references, Wadding numbers, variants, and citations? If so, you owe it to yourself to try Imprimatur. Imprimatur is a markup language interpreter used to typeset critical edition texts with almost unbelievable ease. The program takes an RTF file (saved from Word, for example) and almost magically formats it as needed. Even if you don't publish critical editions, this program is worth a look just to see the amazing techniques it uses to produce a typeset document in Word. You can learn more here:

http://www.geocities.com/imprimaturweb/

Posted in Proofreading | Leave a comment

Word Expert Quiz

This week, just for fun (and for review), I've created a quiz. Use it to rate your skill in editing on the computer, using 1 as the lowest level ("I never do this") and 5 as the highest ("I always do this"):

1 2 3 4 5 I use styles and eschew manual formatting.

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

1 2 3 4 5 I use keyboard shortcuts and avoid reaching for the mouse.

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

1 2 3 4 5 I use spell check as a way to catch typographical errors.

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

1 2 3 4 5 I use AutoCorrect and AutoText to speed up text entry.

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

1 2 3 4 5 I use find and replace, including wildcards, to fix repetitive errors and inconsistencies.

http://www.editorium.com/ftp/adancedsearch.zip

1 2 3 4 5 I use customized templates and styles to format documents.

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

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

1 2 3 4 5 I customize Word's menus, toolbars, and keyboard shortcuts to fit the way I work.

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

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

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

1 2 3 4 5 I record macros to perform repetitive tasks.

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

1 2 3 4 5 I use other macros and add-in software to provide features not available in Word alone.

Using "Found" Macros

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

1 2 3 4 5 I consciously seek to learn more about editing in Microsoft Word.

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

http://www.mvps.org/word/

Scoring

Total the scores for all of the questions. Then find your ranking:

10-20 Clueless newbie. Review the information available through the links above.

20-30 Typical editor. Review the information for any items you rated 3 or below.

30-40 Editing expert. Review the information for any items you rated 3 or below.

40-50 Word guru. To reach the ranks of the truly elite, learn to *program* Word macros using Visual Basic for Applications. You can get started here:

http://www.mvps.org/word/FAQs/MacrosVBA/VBABasicsIn15Mins.htm

_________________________________________

READERS WRITE

After reading last week's article "What's Your Handle," an anonymous reader wrote:

As a veteran of many find-and-replace operations, I enjoyed your article about "handles" and I thought that that's a very good way of explaining the concept. However, in this particular example, if I had been doing it, I would have first selected all the text in the document and made it all Body Text. In this way, I wouldn't have had to do your last step.

_________________________________________

RESOURCES

Holy smoke! Look at all the online reference works at Bartleby.com!

http://www.bartleby.com/reference/

Posted in Editing | Leave a comment

What's Your Handle?

When faced with a situation requiring a complex find and replace in Microsoft Word, many people have no idea even where to begin. If you're one of those people, here's the secret: Find the handle.

What do I mean by "handle"? Something your find and replace routine can grab onto to do what it needs to do. For example, a few weeks ago I was faced with a 500-page manuscript that had no style formatting for its different text levels--something I'm sure your authors would *never* give you.

Basically, the text looked like this (but there was a lot more of it, of course):

This Is a Heading

This is some text. And more text. And more. And really several paragraphs more.

JML

This Is a Heading

This is some text. And more text. And more. And really several paragraphs more.

ED

This Is a Heading

This is some text. And more text. And more. And really several paragraphs more.

CBD

So there I am, badly needing styles to be applied and yet not wanting to do it by hand. The first thing I looked for was a handle--some regularly occurring pattern that I could find and then replace with itself but now with a style applied. Since this author, like most authors, was utterly ignorant of the proper way to put line spacing in front of a heading (by modifying "space before" in the heading style), he'd inserted two extra carriage returns in front of every main heading--and nowhere else. There was my handle!

So, after calling up the Replace dialog (Edit > Replace), I typed this into the "Find What" box:

^13^13^13(*)^13

And I typed the Find What Expression code, surrounded by carriage returns, into the "Replace With" box:

^p1^p

Incidentally, you can learn more about all of the wildcards in this article in my paper "Advanced Find and Replace in Microsoft Word," which you can download--free!--here:

http://www.editorium.com/ftp/advancedfind.zip

After typing in my find and replace strings, I clicked the More button to display the other Find and Replace options. I clicked the Format button, then "Styles," and then "Heading 1" so the replaced text would be formatted with that style. I put a check in the "Use Wildcards" checkbox. Then I clicked the "Replace All" button.

Ta-da! All of my main headings (and author attributions) were now formatted with the Heading 1 style.

So, how about those author attributions? There sure were a lot of them--each on its own line at the end of each short article. And each one was simply the author's initials--JML, ED, CBD, and the like. There was my handle--two or more capital letters preceded and followed by a carriage return.

In the "Find What" box I typed this:

^13([A-Z]{2,})^13

And in the "Replace With" box I typed this:

^p1^p

Again, I clicked the Format button, then "Styles," and this time "Heading 2" so the replaced text would be formatted with that style. I made sure the check was still in the "Use Wildcards" checkbox. Then I clicked the "Replace All" button, which formatted all of those authors' initials with the Heading 2 style.

The final thing I needed to style was the paragraphs between each occurrence of Heading 1 text and Heading 2 text. There were no obvious handles associated with that text, but it did have those styled headings above and below it. Could I use those for my handles? Yes, but first I'd need to mark them with some arbitrary codes. Why? Because there's no way to find Heading 1 *and* some text *and* Heading 2, all in one pass. So here are the searches (this time with "Use Wildcards" turned *off*) that I used to mark those headings:

Find What:

Heading 1 formatting

Replace With:

^&

Find What:

Heading 2 formatting

Replace With:

^&

That left me with an

code at the end of each Heading 1 (really, at the beginning of the paragraph following it) and an

code at the beginning of each Heading 2. Excellent handles indeed!

My final step was to search for those codes and the text between them, removing the codes and styling the text as Body Text. Piece of cake:

Find What (with "Use Wildcards" turned on):

(*)

Replace With (formatted with the Body Text style):

1

And that did the job. I still had some cleanup to do (like eliminating double carriage returns), but by looking for the handles in the text I was editing, I was able to style a 500-page document in less than five minutes.

The next time you're faced with a similar chore, don't just slog through the document doing everything by hand. Instead, see if there are some handles that will let you automate the whole process. You won't always find them, but you'll find them often enough to make the effort well worth your while. Please note that you should always back up your documents and run your find and replace routines on some test documents before proceeding with the real thing.

If you spend much time doing the kind of thing this article describes, you really should try our RazzmaTag program, which will automate a whole raft of complex find-and-replace operations over a whole raft of documents. You can learn more here:

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

_________________________________________

READERS WRITE

Eric Fletcher wrote:

Late last year as part of a message I sent you regarding styles, I mentioned my use of Word 2002's Task Pane. I've been using it a lot and have found it to be an extremely useful tool in more ways than I'd thought. But don't rely on the built-in Help: it is particularly sparse and almost makes it look like the feature was added at the last moment. Here are some of my observations in no particular order.

1. I've made a tool button to be able to pop the Task Pane up whenever I need it. I have two monitors, so I float the task pane (and other toolbars) in the second one most of the time. However, on my wife's single monitor, a button makes it easier to be able to hide and restore the Task Pane (instead of the View | Task Pane menu). You can use a preset button or make your own.

2. The Clipboard panel holds up to 24 elements as you cut or copy. A 25th pushes the first off the stack. You can paste any item by clicking on it, but be aware that a right click lets you delete a clipboard item. This is handy when you need to cut something in a series of copies, or if you inadvertently copy something you don't really need. The feature has the utility of the old "spike" function but lets you manage the contents in a way Spike never did. Excel users should note that the Word and Excel task panes share the same content, so copying between the two is easy. (Very handy for ad hoc copying of addresses from Excel to Word when a mail merge is too much bother!)

3. The Styles and Formatting panel (S&F) has some very useful features for cleaning up document formats. If you've ever examined a Word file in a text editor, you may have noticed how all formatting is collected at the end and each different instance has pointers back into the text where it is to be applied. S&F appears to use this to great advantage: each different instance of any type of formatting can be listed in the S&F panel depending on what you choose to show via dropdown at the bottom of the panel.

The feature is not particularly intuitive, so open a document and try it. Consider a document with a few levels of headings and some manually applied formatting. Bring up the Task Pane and set it to the S&F panel. When you click on a subhead--say Heading 3--in the text, the S&F panel will display the style name at the top. If the selection is a variant of the defined style, the difference(s) will be noted: for example, "Heading 3 + Garamond" when I set a Heading 3 to the Garamond font. But click to the right side of the box and pull down the list to see the options:

Select all XX Instance(s) lets you select all instances within the document but also gives you a *count* of how many there are. (This is very useful if you need to do a count of instances of a particular style: how many bibliographic references are there in this document? Is this the only time I used a Heading 5?)

Clear Formatting removes formatting from the selection.

New Style brings up the dialog to make a new style based on the selection.

Modify Style lets you change the style definition.

Reveal Formatting switches to a different panel to give you all the specific formatting details.

But with the selection still in the modified Heading 3, scroll down and look at the options available for the "Heading 3" style: "Update to match selection" lets you modify the defined style to match the selection in one step. Very useful!

The other different option is Delete. This removes the style definition but doesn't delete the formatted content. In fact, it appears to have the same effect as the "Clear formatting" style selection. Particularly if I am in the process of preparing a template, I like to go through and remove any unnecessary style definitions before finalizing it.

3. When there has been a lot of "fiddling" done to make pages fit, a document can often have numerous variations on style (for example, "Body Text + Condensed by 0.1pt" or "Body Text + Before: 4pt"). If you need to re-use such copy, these variations can create headaches later. Use the S&F panel to browse through and eliminate all such variants. (I use it to remove all extraneous variations to prepare copy for conversion to HTML since I then don't have to deal with manually removing all the code Word prepares for me.)

4. Use the "Show" dropdown in the S&F panel to manage what formatting is displayed. The "Formatting in use" shows only the formatting used within the document (styles and variants of them); "Available formatting" adds the styles defined for the currently-applied template; "Available styles" lists only the styles and without the variants; and "All styles" displays the styles from the current template plus the names of Word's "built-in" styles. This latter option is lengthy, but you can pare it down by choosing "Custom . . ." and selecting which styles you want to have displayed.

Use the Custom pulldown to define what variants should be displayed (font, paragraph, bullet & numbering) and to add the "Clear formatting" option to the style list (which also puts it at the top of the style toolbar pulldown, incidentally). The selection of styles to make visible or not changes by the category selected. Finally, you can save the options in the template so it is set for other or later use.

5. The Reveal Formatting panel (RF) shows all the details about the format of the current selection. If you select "Distinguish source style" at the bottom of the panel, the display shows the underlying style and any differences--showing the detail much as the variants are shown in the S&F panel. The pulldown options for the selection let you clear formatting, choose all other similar formatting in the document, but also change the format to match the surrounding text. I'm not entirely sure what rules are used for this: a word set with French language was set to English but only if I selected the whole word; but a word set in green was changed to black when the selection was within the word.

Select something and then turn on the "Compare with another selection" checkbox. A second box appears, and when you make a second selection, the panel itemizes the differences.

My documents are cleaner and smaller since I've incorporated the Task Pane into my set of Word tools.

Many thanks to Eric for these useful revelations.

_________________________________________

RESOURCES

Jean Hollis Weber has done it again with her article "Escape from the Grammar Trap," now available on the TECHWR-L site, here:

http://www.raycomm.com/techwhirl/magazine/writing/grammartrap.html

The article explains why editors too often focus on details and not the bigger picture; how much attention they should pay to formal rules of grammar, punctuation, and usage; and how they can distinguish between essential and nonessential rules. I've worked with many editors and proofreaders who could benefit from Jean's words of wisdom.

Like the article? Be sure to check out Jean's books, newsletter, and other goodies at her Web site, the Technical Editors' Eyrie:

http://www.jeanweber.com/

Posted in Editing | 2 Responses

Wildcard Searching with Tracked Changes

Have you ever put together a clever wildcard Find and Replace routine that you *know* should work, but when you run the routine, you end up with something unexpected? You do it all the time? So do I, but that's not quite what I meant. I'm thinking specifically about routines that use the Find What Text code or the Find What Expression code, which you can learn more about here:

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

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

Let's say you've got a document that has revision tracking turned on (Tools > Track Changes), and in that document is a numbered list, like this:

1. First

2. Second

3. Third

Let's also say you want to use a wildcard Find and Replace to change the list to this:

(1) First

(2) Second

(3) Third

You should be able to do it like this:

1. Click Edit > Replace to bring up Word's Replace dialog.

2. In the "Find What" box, enter this:

([0-9]@)(. )

3. In the "Replace With" box, enter this (with a space after it):

(1)

4. Put a checkmark in the box labeled "Use wildcards."

5. Click the button labeled "Replace All."

But it won't work. What you'll get is a list that looks like this:

1() First

2() Second

3() Third

How frustrating!

The problem is a bug in Word's wildcard Find and Replace engine. The easy way around the problem is to turn off revision tracking before doing the Find and Replace. So there you go!

If you *need* the changes to be tracked, however, you're in trouble. I know of one possible solution:

1. Keep a backup copy of your original document.

2. Do your Find and Replace with revision tracking turned off.

3. Use Tools > Track Changes > Compare Documents to mark the differences between the changed document and your backup copy.

If you're interested in trying this approach, you might want to know that Compare Documents has been much improved in Word 2002. For example, let's say Document 1 contains a bunch of parenthetical figure references, like this:

(Fig. 8)

Let's also say you want to use a wildcard Find and Replace to put bold tags around each one, like this:

(Fig. 8)

With revision tracking turned on, Word 2000 will give you the following, with the bold codes marked as additions and "(Fig. 8)" marked as a deletion (here represented by consecutive hyphens):

--------(Fig. 8)

Word 2002, however, will give you this, pure and simple, with the bold codes marked as additions and no unnecessary deletion:

(Fig. 8)

No matter what version of Word you're using, now maybe the next time you need to use revision tracking with wildcard searching, you can avoid some of the fuss.

Thanks to Karen L. Bojda and Allene M. Goforth for the examples and the idea for this article.

_________________________________________

READERS WRITE

I've received so many great tips from readers that I'm simply not able to include everything in this week's newsletter. My apologies to those who are still waiting; in some cases, I'm holding messages to go with a specific article, so they may not show up for several weeks. Thanks for your patience. And please, keep those tips coming!

After reading about the problems of automatic formatting in Word's Document Map over the past couple of weeks, Phil Rabichow (phrab@earthlink.net) sent some pretty useful tips:

I've been experimenting with the Document Map with Word 2000. Here's what I've found, assuming that you have lines that "look like" headings:.

1. If you open a document with headings already in it, Word doesn't add its own. I know that you've found this to be flaky, and I'm wondering if there are some other "rules" that Word follows.

2. If you open a document with Doc Map turned off, nothing happens, of course. If you then turn on Doc Map, Word autoformats the file. You can press Ctrl+Z once to undo the autoformat and make any edits you want without problems. [Note: This is a major discovery on Phil's part.]

3. If you try to replace Level 1 paragraph formatting with Body Text formatting using Find/Replace, it won't work. You can click Replace All, and Word will tell you that it's making changes, but nothing happens. You must include the style definition (e.g., Normal) in the Replace box in order for it to work. And when you do that, it's not necessary to include a paragraph level in the Replace box for it to work. Once you do a Find/Replace, you can click the Doc Map on and off without Word making paragraph level changes.

4. The only problem comes when Doc Map is turned on when you open a document. Since the Level 1 that Doc Map applies is direct formatting, you can select all (Ctrl+A) and press Ctrl+Q to remove all direct paragraph formatting (and leave all character formatting or styles). This will remove all Word's automatic changes, which isn't a problem provided you haven't applied direct *paragraph* formatting yourself to other parts of the document.

Many thanks to Phil for his comments and suggestions.

_________________________________________

RESOURCES

OfficeZealot ("where Office zealots come to play . . ." ) is a great-looking site featuring all kinds of information about your favorite word processor and its siblings:

http://officezealot.com/

Posted in Editing | Leave a comment

Unlinking Headers and Footers

If you work much with headers and footers in Microsoft Word, you've probably noticed that when you insert a section break, it's automatically set to "Same as Previous." For many Word users, especially in the publishing world, this is an annoyance. If I'm creating a new chapter in a book, I want my headers to be *different* from those in the previous chapter, not the same. Ideally, there should be a way to set this (or not) as an option:

[] Automatically set headers and footers to "Same as Previous"

As far as I know, this option doesn't exist. If you know otherwise, please let me know, and I'll include your tip in next week's newsletter. In the meantime, here's a macro that will go through a document's headers and footers and unlink them all:

'THE MACRO STARTS HERE
Dim curSection As Section, curHeader As HeaderFooter
For Each curSection In ActiveDocument.Sections
For Each curHeader In curSection.Headers
curHeader.LinkToPrevious = False
Next curHeader
Next curSection
'THE MACRO ENDS HERE

If you don't know how to use macros like that one, you can learn here.

The macro won't set the option permanently, but at least you'll no longer need to unlink all of your headers and footers by hand.

Thanks to Susan Bullowa for suggesting this topic.

_________________________________________

READERS WRITE

I've received so many great tips from readers that I'm simply not able to include everything in this week's newsletter. My apologies to those who are still waiting; in some cases, I'm holding messages to go with a specific article, so they may not show up for several weeks. Thanks for your patience. And please, keep those tips coming!

After reading last week's exchange about automatic formatting in Word's Document Map, Hilary Powers wrote:

After describing the problem of non-heading items showing up in the Document Map, and restoring themselves to it after being removed by a VBA routine, Bill Fosbury wrote:

I will

* run my program to change the outline level to "body text"

* then add the headings that I want

* the next time I open the file the document map builder will be happy

the next time I open the file because I will have some heads and I will

therefore not look for candidates.

To which Jack Lyon writes:

What you've said makes perfect sense. Document Map can't work unless it

has something to work with. So if it doesn't, rather than just sit there

blank (and leave the user wondering why nothing's happening), it

autoformats the document so it *will* have something to work with....

That's certainly the way it looks like it's working, or at least ought to work, but it's not. At any rate, I too have a charming little VBA routine that gets rid of garbage on the Document Map. And when I save the file and reopen it, all the garbage is back. But. Garbage appears unpredictably, whether or not a file has headings defined using Word styles, and as far as I can tell, once a file develops that sort of garbage it never loses it permanently. Meanwhile, if no lines in a file look like headings, the Document Map will show up with nothing in it; it doesn't have to find something and put it up. Nobody's found a fix for this over on the Word-PC list; I've just got the cleaner on a hot key and run it as needed.

I'm not certain if the Document Map ever lets go of stuff it's defined--it may well do so, as many files never develop garbage. But just defining a set of headings is no guarantee that it won't go its own cluttered way....

_____________________

After reading last week's article on automatic dashes, my longtime friend Richard O'Regan wrote:

I disagree with you on the use of the en dash. At least, over here, in "old Europe," the en dash, preceded and followed by a space, is used both in the UK and on the Continent. The em dash no longer sees the light of day.

_____________________

Lindy M wrote:

I share your preference for the em dash rather than the spaced en, but I do use the latter, for one reason: it's easier to control line breaks. With a nonbreaking space before the en dash I can ensure it always breaks at the end of a line rather than at the beginning. I can't find any way to attach an em dash to the end of a word other than spacing it, which would look excessive to my eye. I might add that some people firmly believe that dashes should appear at the beginning of a line, not the end. I don't. I should also confess that I use Word as little as possible. From what I've seen it handles em dash breaks elegantly, but some other word processors and page layout programs need help with this sort of thing, especially older versions.

Thanks to all for their comments and suggestions.

_________________________________________

RESOURCES

I've been almost in despair about what to do about spam. Then here comes an email message from my Aussie mate Steve Hudson, who pointed me to Cloudmark's free SpamNet program:

http://www.cloudmark.com/products/spamnet/

Unlike other such programs, this one uses the power of distributed computing to identify and block spam. It's not foolproof, but it's sure caught an awful lot of spam for me. Check it out!

Posted in Typesetting | Leave a comment

Automatic Dashes

Helpful as always, Microsoft Word will automatically insert em dashes for you--but with an interesting twist. I'll tell you what it is in just a minute. But first, here's how to turn on those automatic dashes if you want to use them:

1. Click the Tools menu.

2. Click "AutoCorrect."

3. Click the tab labeled "AutoFormat As You Type."

4. Under "Replace as you type," put a check in the box labeled "Symbol characters (--) with symbols (--)."

5. Click the OK button.

To see how the feature works:

1. Create a new document and type in a word.

2. After you've typed the word, don't hit the spacebar; instead, type two hyphens in a row.

3. Once again, don't hit the spacebar; instead, type another word.

4. *Now* hit the spacebar.

Wow, your two hyphens have turned into an em dash! What, you already knew you could do that? Okay, here's the interesting twist:

1. Create a new document and type in a word.

2. After you've typed the word, *do* hit the spacebar.

3. Type a single hyphen.

4. Hit the spacebar again.

5. Type another word.

6. Hit the spacebar again.

Wow, your single hyphen has turned into an en dash! What's going on here?

In the world of typography, there are several kinds of dashes, each with a different length. As the Chicago Manual of Style (5.105) notes, "There are en dashes, em dashes, and 2- and 3-em dashes. . . . Each kind of dash has its own uses." Chicago specifies that the em dash should be used to indicate "sudden breaks and abrupt changes" and "amplifying, explanatory, and digressive elements."

Some designers, however, beg to differ. Instead of using an em dash, they use an en dash surrounded by spaces. Robert Bringhurst argues for this in his book The Elements of Typographic Style (p. 80):

"The em dash is the nineteenth-century standard, still prescribed in many editorial style books, but the em dash is too long for use with the best text faces. Like the oversized space between sentences, it belongs to the padded and corseted aesthetic of Victorian typography. Used as a phrase marker - thus - the en dash is set with a normal word space either side."

In my opinion, Bringhurst is wrong. The whole point of the em dash is to indicate an abrupt change, and a long dash does that better than a short one. That's why Messrs. Garamond, Goudy, and Gill *designed* long dashes for their typefaces, fer cryin' out loud. The shorter en dash surrounded by spaces may look "prettier," but it is also less forceful, and form should follow function. That's my take on it, anyway.

The interesting thing is that Microsoft seems to be trying to accommodate *both* usages. If you type two hyphens in a row, you'll get an em dash. If you type space, hyphen, space, you'll get an en dash with spaces. Chicago or Bringhurst, take your pick. Thanks, Microsoft!

You can learn more about the Chicago Manual of Style here:

http://www.press.uchicago.edu/cgi-bin/hfs.cgi/00/12245.ctl

And you can learn more about The Elements of Typographic Style here:

http://www.typebooks.org/r-elements.htm

Thanks to Steve Hudson for suggesting this topic.

_________________________________________

READERS WRITE

Bill Fosbury wrote:

I saw "Content vs preparation" at:

http://www.planetpublish.com/mainpage.asp?webpageid=231

It talks about the Document Map and the Outline Level.

I have the opposite problem. After saving a Lotus WordPro file as a MS Word file, I opened it in Word and saw lots of unwanted stuff in the Document Map. After spend several hours experimenting I discovered the Outline Level and changed it BACK to "Body text". The item disappeared from the Document Map. Since I had so many to change, I figured out how to write some Visual Basic code to change all of them. That worked fine:


Public Sub RemoveFromDocumentMap()
Dim aParagraph  As Paragraph
For Each aParagraph In ActiveDocument.Paragraphs
aParagraph.Range.ParagraphFormat.OutlineLevel = wdOutlineLevelBodyText
Next
End Sub

BUT, after saving the file and then reopening it, good old Word changed the Outline Level for all those chunks of text BACK to "Level 1".

A few hours later I came to the realization about what I think is happening and now have a solution. Following this path in Help:

Help

Answer Wizard

search: document map

"Troubleshoot working with the document map"

select: "The Document Map doesn't display some or all of the document's headings."

brings one to this key sentence: "If Word can't find any headings formatted with the heading styles or outline levels, it automatically searches the document for paragraphs that look like headings "

My file does NOT contain any headings (yet).

I read that sentence many times but its significance had not set in.

This is what is happening:

* there are no headings in my document

* when my program changes the outline level to "body text" that removes ALL document map candidates.

* everything disappears for the document map

* when I close and reopen the file, that key sentence comes into play

* since there are NO HEADINGS, it searches for candidates, as that sentence says, and it brings back everything that my program had gotten rid of.

I will

* run my program to change the outline level to "body text"

* then add the headings that I want

* the next time I open the file the document map builder will be happy the next time I open the file because I will have some heads and I will therefore not look for candidates.

After reading Bill's message, I responded:

What you've said makes perfect sense. Document Map can't work unless it has something to work with. So if it doesn't, rather than just sit there blank (and leave the user wondering why nothing's happening), it autoformats the document so it *will* have something to work with. Very typical of Microsoft's general "friendliness" that ends up causing problems rather than solving them. A better approach would have been for Word to say something like "Your document has no headings styles that can be displayed in Document Map. Please apply heading styles and try again." Oh, well.

Thanks to Bill for the useful information.

_________________________________________

RESOURCES

The Get It Write tip archive offers this useful advice on using dashes:

http://www.getitwriteonline.com/archive/091502.htm

But it also offers many other articles for writers and editors:

http://www.getitwriteonline.com/archive/tips.htm

Want tips delivered free by email? You can sign up here:

http://www.getitwriteonline.com/signup.cfm

Posted in Editing | Leave a comment

Word in Your Pocket

About a year ago, after much back-and-forthing, I finally broke down and bought a Pocket PC--an AudioVox Maestro. Much to my surprise, I loved it, although I was vastly disappointed in the pocket edition of Microsoft Word. Sure, it could open the Word documents I was editing on my desktop computer, but it stripped out such advanced features as footnotes and even styles, dashing my hopes that it could be used for serious editing on the go.

Then, a couple of months ago, I started hearing about a Pocket PC word processor that emulated many of Word's features. Its name was TextMaker, from a company called SoftMaker. I downloaded the trial version, not really expecting it to amount to much. Boy, was I wrong. This program is so impressive I decided I had to tell you about it--not because I have any financial interest in it (I don't) but because it makes an excellent editing system for Microsoft Word documents when you're away from your desktop. (I'm using the program to write this article.)

TextMaker works very much like Word, right down to the red squiggles under misspelled words. Here's a partial list of features:

* paragraph and character styles

* footnotes and endnotes

* find and replace

* multilanguage spell checking

* thesaurus

* indexing

* tables of contents

* headers and footers

* graphics support

* hidden text

* columns

* bookmarks

* symbol characters

* frames

* merge

* tables and sorting

* borders

* automatic hyphenation

TextMaker has all this and more, on a Pocket PC, with the look and feel of Microsoft Word--only smaller! The find and replace feature even includes limited wildcard searching, and it also allows you to search for formatting (including styles) as well as text. Round-tripping between TextMaker and Word on my desktop is flawless except for one thing--TextMaker doesn't do revision tracking (it imports revisions as underline and strikethrough). Ah, well. I guess I can't expect perfection. But TextMaker comes awfully close.

You can learn more about TextMaker here:

http://www.softmaker.de/tmp_en.htm

There are three other programs that really make a Pocket PC worth having. One is Fitaly, which makes entering text a cinch. Use it with the Pocket PC's autocompletion feature and you'll understand how I was able to write this whole article using a stylus. You can learn more about Fitaly here:

http://www.fitaly.com/wince/pocketpcfitaly.htm

Another is Pocket Informant, an information manager. I use it to keep track of publishing schedules and editing tasks, and there's really no similar program that has anywhere near its flexibility and power.

http://www.pocketinformant.com/PocketInformant.php

Finally, there's the free Microsoft Reader that comes with a Pocket PC. When I bought mine, I didn't realize that one benefit would be almost instant, free access to thousands of downloadable books. There are many sources for these, but here are a couple of my favorites:

http://www.blackmask.com/page.php

http://www.bartleby.com/ebook/

Not all books are free, of course, and many nice electronic versions are well worth paying for. Check out the terrific commercial offerings (including my book Total Word Domination) at PocketPCpress:

http://www.pocketpcpress.com/

Note that you can make your own Microsoft Reader books (a nice way to review manuscripts) with a free Microsoft Word add-in that you can download here:

http://www.microsoft.com/reader/downloads/rmr.asp

Have I convinced you yet? If so, you might want to look at the beautiful e750 Pocket PC from Toshiba, which you can learn about here:

http://www.pdabuyersguide.com/toshiba_e750.htm

Don't need that much horsepower (or price)? Maybe you'd like the ViewSonic V35:

http://www.viewsonic.com/products/pocket_pc_pocketpcv35.htm

You can read about and compare lots of Pocket PCs here:

http://www.pdabuyersguide.com/ppc.htm

_________________________________________

RESOURCES

SoftMaker is making a very generous offer to you as a reader of Editorium Update. They're willing to *give* you a complimentary, registered copy of TextMaker for your *desktop* computer (no kidding) so you can see what this wonderful program has to offer. It has all the features of the Pocket PC version, as described above, with a current retail price of $49.95, but you'll get it at no charge and with no strings attached. This is a *great* word processor, powerful and light on its feet, and it's extremely compatible with Microsoft Word. Better get it while you can. You can learn more here:

http://www.softmaker.de/freetm.htm

Want to tell your friends? It's okay to do so, but I'd appreciate the courtesy of letting them know about Editorium Update rather than just sending them the URL above. After all, SoftMaker made their offer specifically to readers of Editorium Update. So why not help your friends become readers? Then they can take advantage of this offer too! Signing up for the newsletter is easy. Just send a blank email message to editorium-subscribe [at symbol] topica.com. Thanks for your consideration and support.

Posted in Editing | Leave a comment

Character Styles Macro

Most Microsoft Word users who need to use bold or italic just press CTRL + B or CTRL + I and go blithely on their way, not thinking any more about it. But at some point, they'll run into problems. For example, their directly applied formatting may disappear when they apply a paragraph style over the top of it. You can read more about this here:

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

Another example is that sometimes directly applied formatting simply refuses to be found with Word's Find feature. I don't know why that is, but I've seen it time after time.

The solution to such problems is to avoid using directly applied character formatting entirely. Instead, use character *styles* formatted as bold or italic. Unfortunately, doing so isn't nearly as easy as using plain old character formatting--until now. I'm providing a macro that will create the character style you need and then toggle between bold and roman, italic and roman, or other formatting using Word's built-in keyboard shortcuts and toolbar buttons. Pretty slick! Here's the macro for italic:

'THE MACRO STARTS HERE
Dim Found, myStyle
Found = False
For Each myStyle In ActiveDocument.Styles
If myStyle.NameLocal = "Italic" Then
Found = True
Exit For
End If
Next
If Found = False Then
ActiveDocument.Styles.Add _
Name:="Italic", _
Type:=wdStyleTypeCharacter
ActiveDocument.Styles("Italic").BaseStyle = _
"Default Paragraph Font"
ActiveDocument.Styles("Italic").Font.Italic = True
End If
mySel = Selection.Font.Italic
If mySel = wdUndefined Or mySel = False Then
Selection.Style = "Italic"
Else
Selection.Style = "Default Paragraph Font"
End If
'THE MACRO ENDS HERE

If you don't know how to use macros like that one, you can learn how here.

The first part of the macro (from "For Each" to "Next") checks to see if the character style (in this case named "Italic") already exists. If it does, the macro leaves it alone, which means you can create and format your character styles any way you like so they will work with this macro. If the character style *doesn't* exist, the macro creates it with the appropriate formatting (in this case, italic--note the line that says "ActiveDocument.Styles("Italic").Font.Italic = True").

The second part of the macro checks to see if any part of the selection (which may be selected text or simply the text at the cursor position) is already formatted as italic. If it's not (or if part of it is), the macro applies the Italic character style. If the selection is already italic, the macro applies the Default Paragraph Font to make the selection roman.

You've probably already figured out that you can modify the macro to take care of bold, underlining, or other kinds of formatting. To do so, you'll need to change "Italic" to "Bold" (or whatever) wherever it appears in these six lines of the macro:

If myStyle.NameLocal = "Italic" Then

Name:="Italic", _

ActiveDocument.Styles("Italic").BaseStyle = _

ActiveDocument.Styles("Italic").Font.Italic = True

mySel = Selection.Font.Italic

Selection.Style = "Italic"

Note that in the following line, you'll have to change it twice:

ActiveDocument.Styles("Italic").Font.Italic = True

In making your changes, you can use Bold, Italic, Underline, SmallCaps, AllCaps, Superscript, Subscript, Strikethrough, Hidden, Outline, or Shadow. (A few other formats are also available; if you're interested, see the "Properties" listing for "Font Object" in Word's Visual Basic Help file.)

There's one more line you might be interested in modifying:

"Default Paragraph Font"

You can change this line to the name of an actual font you want to use (for example, "Baskerville"). This is useful if you want to specify the name of a true italic font to provide italic formatting or to get fancy in other ways.

To get the macro to work when you press one of Word's built-in keyboard commands (such as CTRL + I) or toolbar buttons, simply give the macro the same name as the Word command. For example, if you name the macro "Italic," like this--


Sub Italic()

--then Word will happily treat it just as if it were the built-in Italic command! For your convenience, the names of Word's built-in character formatting commands are Bold, Italic, Underline, SmallCaps, AllCaps, Superscript, Subscript, Strikethrough, Hidden, Outline, and Shadow.

After you've used the macro to apply formatting to some text, you'll see the name of the character style (such as "Italic") in the Styles list on the Formatting toolbar.

Here's an equivalent macro for Word 6 or 95; notice that the formatting is set with "1" or "-1" in case you want to change it:

'THE MACRO STARTS HERE
If StyleDesc$("Italic") = "" Then
FormatStyle .Name = "Italic", 
.BasedOn = "Default Paragraph Font", 
.Type = 1, .AddToTemplate = 0, .Define
FormatDefineStyleFont 
.Bold = - 1, 
.Italic = 1, 
.Underline = - 1, 
.SmallCaps = - 1, 
.AllCaps = - 1, 
.Superscript = - 1, 
.Subscript = - 1, 
.Strikethrough = - 1, 
.Hidden = - 1, 
.Outline = - 1, 
.Shadow = - 1, 
.Font = "(normal text)"
End If
If Italic() <> 1 Then
Style "Italic"
Else
Style "Default Paragraph Font"
End If
'THE MACRO ENDS HERE

Thanks to Steve Hudson for VBA advice.

_________________________________________

READERS WRITE

Susan Bullowa wrote:

If you have the Styles and Formatting Task Pane open In Word 2002 and you hover the arrow cursor over the paragraph mark to the right of the style name, the tool tip with all of the style's attributes appears. I find the tool tip information useful because it usually displays more detail than the listing of attributes in the Modify Styles dialog box. When the tool tip appears and I want to record the information, I press the Print Scr button and paste the picture into Paint. In that way, I can print the information for myself while I build my spreadsheet of style attributes.

Thanks to Susan for the useful tip.

_________________________________________

RESOURCES

Want to learn more about using styles? Check out Microsoft's "Tips for Understanding Styles in Word":

http://www.microsoft.com/office/using/column14.asp

Posted in Editing | Leave a comment

Go Tell Microsoft!

Several readers have written to complain about Microsoft's "enhancements" of various features in Word 2002. Most notably, the Comments and Revision Tracking features are broken. I've written about these here:

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

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

Reader Ned Humphrey suggested starting a campaign to get Microsoft to reverse itself on such "disimprovements," which I thought was a great idea. So gentle reader, if you're so inclined, I'd like to enlist your help in asking Microsoft to change Comments and Revision Tracking back to the way they worked in Word 2000--or at least to give us the option of having them work the old way. Are you with me? ARE YOU WITH ME? (Sorry, I got a little carried away there.)

If you are, or if you have any other suggestions you'd like to give to Microsoft, you can do so here:

http://support.microsoft.com/default.aspx?scid=fh;[ln];feedback

Microsoft is asking for feedback, and I say we should give it to them. Please take a minute to click on the link above and send Microsoft your ideas. If we all work together, we should be able to help make a great word processor even better. And if you've ever wondered how to go about giving feedback to Microsoft, now you know how. Thanks for your help.

_________________________________________

READERS WRITE

Hilary Powers sent a correction to her serial comma macro that appeared in last week's newsletter. She wrote:

Everybody needs an editor. Turns out there's a mistake in my macro as presented--it won't ignore "andiron" at all. It needs to look like this instead:

'THE MACRO STARTS HERE
'Serial Macro
'Macro written 02/27/03 by Hilary Powers; updated 3/12
'
Selection.Find.ClearFormatting
With Selection.Find
.text = "and"
' REMOVED LEADING SPACE IN SEARCH STRING
.MatchCase = True
.MatchWholeWord = True
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=2
' BACK UP TWO SPACES BEHIND SEARCH STRING TO MAKE UP FOR DELETED SPACE
Selection.TypeText text:=","
'THE MACRO ENDS HERE

I didn't spot the problem until I contemplated the version in the newsletter and started wondering how it can find "whole words" on a string containing a space. I wrote that bit in rather than recording it, and the macro works without complaint--but it turns out that the string simply overrides that provision. So everything's fine as long as the next "and" string really is a whole word, but if it's not--a rare but possible thing--you get a comma there anyway.

If you don't know how to use macros like the one sent by Hilary, you can learn how here.

___________________________

Marty Spitzenberger sent in a way to insert serial commas using a wildcard Find and Replace. He wrote:

Type "([!,]) and>" (without the quotes) in the Find what field, and "1, and" in the Replace with field. Check the "Use Wildcards" box. Do Find Next. If the found text needs a comma, then do Replace. Since another Find Next is automatically performed after the Replace, exit the dialog box and do to return to the point of text replacement so the manual review can continue. This sequence can be recorded and saved as a macro.

The Find What text above translates to the following: find a group of one character that is not a comma, followed by one space character, followed by "and", which is the end of the word. This approach avoids a match to something like "black andirons."

Obviously, this will still find "Jack and Jill", which doesn't need a comma, but then so does last week's macro. This approach does avoid the extra steps in the macro of moving the cursor to the end of the previous word to insert the comma. The Replace With text translates to: replace the selection with the found group/character that wasn't a comma, then a comma followed by a space character and "and".

An improved search string would find sentences with a serial comma error in the form "I like a, b and c." This wildcard Find What string is:

(, [!.,:!?^013]@) and>

This search string finds the following sequence of characters:

a comma,

a space,

one or more characters that do not include period, comma, colon, exclamation mark, question mark, or paragraph mark

a space,

"and", which is the end of the word

The appropriate Replace With string is unchanged:

1, and

The search string limits the found text to appearing within one sentence of one paragraph, where the sentence contains a comma and then some other text without a comma immediately before " and". This way the search string avoids finding sentences in the form of "I like a and b." While it will incorrectly find sentences in the form of "Sadly, I like a and b.", it is still an improvement.

Another frequent task that can be simplified through wildcard search and replace is the deletion of extra paragraph marks inserted when a word-wrapped paragraph is converted to plain text. For example, my email as attached to your reply now has "> " at the beginning of each line and a paragraph mark at the end of each, with many short lines. Although transforming this text back into nice, word-wrapped paragraphs takes several steps, it is still quicker than doing each replacement manually:

1. Obviously, copy the desired text into a new word document.

2. Remove all of the "> " at the beginning of each line with this:

Find What: ^p>^032

(You can use a space character in place of the ^032 used here and elsewhere. I'm using ^032 to ensure that you enter a space.)

Replace With: ^p

Disable "Use wildcards"

Do Replace All

Note: The ^p at the beginning of the Find What is needed to avoid deleting a "> " string contained within paragraph text, which occurs here in the text representing key labels.

3. Review the text to ensure that there is a tab character starting each paragraph or a blank paragraph following each desired paragraph. Add any that are missing.

Note: Replacements in steps 4 and 5 are done to replace the paragraph mark with a space if a space isn't already before or after the para mark. The Find string also avoids replacing the paragraph mark if it is followed by a tab, under the assumption that this is an indented paragraph or a bullet.

4. Find What: ([!^013^032])^013([!^013^t^032])

Replace With: 1^0322

Check "Use wildcards"

Do Replace All

5. Find What: ([!^013])^013([!^013^t])

Replace With: 12

Check "Use wildcards"

Do Replace All

___________________________

Linda Duguay wrote:

I was recently faced with a request to create a macro to get rid of multiple blank lines in a document. This could happen when a document comes in as a text file or during a merge etc. I brought out my trusty book, Total Word Domination, that you wrote and went to work on the problem using wildcards.

A caveat in this case: there were blank lines between paragraphs (it was a text file so no paragraph spacing) and we wanted to delete them (the first Find command). But we didn't want to delete the actual carriage return at the end of the paragraph, so we searched for two carriage returns and replaced them with one. With all of the double carriage returns out of the picture, we could now search for all occurrences of three or more carriage returns and delete those (the second Find command). It was very fast and did the job. We had over 1,000 pages reduced to 1 page in seconds.

In the case where you want two carriage returns to separate paragraphs, you can either not use the first Find routine or using a message box to ask if this is wanted.

Here is what I came up with:

'THE MACRO STARTS HERE
Dim myRange As Range
ActiveDocument.Bookmarks.Add Name:="TempDBP", Range:=Selection.Range
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^13{2}"
.Replacement.Text = "^13"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.HomeKey Unit:=wdStory
With Selection.Find
.Text = "^13{2,}"
.Replacement.Text = ""
.Forward = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
With ActiveDocument.Bookmarks("TempDBP")
.Select
.Delete
End With
'THE MACRO ENDS HERE

___________________________

From: Phil Rabichow [mailto:phrab@earthlink.net]

The last issue of Editorium pointed out that you can search for ^013 when you're looking for a paragraph mark. You can also use ^13 (just one keystroke less, I know). Anyhow, here is a list of Find/Replace codes:

These you can use when you don't use wildcards:

^p Paragraph mark

^t Tab character

^a Annotation (comment) mark

^0nnn ANSI (4 digit) or ASCII (3 digit) characters, where nnn is the character code

^? Any character

^# Any digit

^$ Any letter

^^ Caret character

^c Clipboard contents

^& Contents of the Find What box

^e Endnote mark

^d Field

^f Footnote mark

^g Graphic

BREAKS

^n Column break

^l Line break

^m Manual page break

^b Section break

HYPHENS AND SPACES

^+ Em dash

^= En dash

^s Nonbreaking space

^~ Nonbreaking hyphen

^- Optional hyphen

^w White space

Here is a list that you can use in Find when using wildcards:

^1 Picture (Except pictures with Float Over Text property, Word 98

Macintosh Edition)

^2 Auto-referenced footnotes

^5 Comment mark

^9 Tab

^11 New line

^12 Page OR section break

^13 Carriage return

^14 Column break

^19 Opening field brace (when the field braces are visible)

^21 Closing field brace (when the field braces are visible)

^? Word 6.x and later: Any single character (not valid in the Replace

box)

^- Optional hyphen

^~ Non-breaking hyphen

^^ Caret character

^# Any digit (Word 6.x and later)

^$ Any letter (Word 6.x and later)

^& Contents of Find What box (Replace box only) (Word 6.x and later)

^+ Em Dash (not valid in the Replace box) (Word 6.x and later)

^= En Dash (not valid in the Replace box) (Word 6.x and later)

^u8195 Em Space Unicode character value search (not valid in the

Replace box)

^u8194 En Space Unicode character value search (not valid in the

Replace box)

^a Comment (not valid in the Replace box) (Word 6.x - Word 7.0)

^b Section Break (not valid in the Replace box) (Word 6.x and later)

^c Replace with Clipboard contents (Replace box only)

^d Field(Word 6.x and later)

^e Endnote Mark (not valid in the Replace box) (Word 6.x and later)

^f Footnote Mark (not valid in the Replace box) (Word 6.x and later)

^g Graphic(Word 6.x and later)

^l New line

^m Manual Page Break (Word 6.x and later)

^n Column break (Word 6.x and later)

^t Tab

^p Paragraph mark

^s Non-breaking space

^w White space (space, non-breaking space, tab; not valid in the

Replace box)

^nnn Where "n" is an ASCII character number

^0nnn Same as above, but uses ANSI characters (ALT+nnn PC only)

^unnnn Word 97 Unicode character search where "n" is a decimal number corresponding to the Unicode character value.

Thanks to one and all for their useful suggestions.

_________________________________________

RESOURCES

If you haven't yet signed up for Allen Wyatt's wonderful WordTips newsletter, you're missing some of the best tips and tricks around. The perfect complement to Editorium Update, WordTips provides a weekly helping of quick, helpful hints for beginners and experts alike. You can learn more and sign up here:

http://www.vitalnews.com/wordtips/

Posted in Editing | Leave a comment