Jack Lyon

Macro to Swap Table Cells

If you work with tables, you've probably wished for a way to automatically swap the contents of two adjacent cells. If so, here's a macro that will do the trick. Just put your cursor in the first of the two cells you want to transpose and then run the macro.

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

'THE MACRO STARTS HERE
Sub SWAPCELLS()
WordBasic.ScreenUpdating 0  'So you don't have to watch gyrations
WordBasic.SelType 1 'Get off any selected text
'In first cell
WordBasic.NextCell  'So you can select cell contents
WordBasic.PrevCell  'Select cell contents
If Asc(WordBasic.[Selection$]()) = 13 Then  'Cell is empty
WordBasic.MsgBox "This cell contains no text to invert.", "Cell Empty"
GoTo Endmacro
Else
WordBasic.WW7_EditAutoText Name:="IMCell1IM", Context:=0, InsertAs:=0, Add:=1
WordBasic.WW6_EditClear
End If
WordBasic.NextCell
'In second cell
If Asc(WordBasic.[Selection$]()) = 13 Then  'Cell is empty
WordBasic.MsgBox "The next cell contains no text to invert.", "Next Cell Empty"
WordBasic.EditUndo  'Put the text back into the first cell
WordBasic.SelType 1 'Get off selected text
GoTo Endmacro
Else
WordBasic.WW7_EditAutoText Name:="IMCell2IM", Context:=0, InsertAs:=0, Add:=1
WordBasic.WW6_EditClear
WordBasic.WW7_EditAutoText Name:="IMCell1IM", Context:=0, InsertAs:=0, Insert:=1
WordBasic.WW7_EditAutoText Name:="IMCell1IM", Context:=0, InsertAs:=0, Delete:=1
End If
WordBasic.PrevCell
'Back in first cell
WordBasic.WW7_EditAutoText Name:="IMCell2IM", Context:=0, InsertAs:=0, Insert:=1
WordBasic.WW7_EditAutoText Name:="IMCell2IM", Context:=0, InsertAs:=0, Delete:=1
Endmacro:
WordBasic.ScreenUpdating 1
WordBasic.ScreenRefresh
End Sub
'THE MACRO ENDS HERE

____________________________________________________

DVORAK KEYBOARD UPDATE

After practicing about half an hour a day for the past three weeks, I'm almost at the point where I can stand to work exclusively in Dvorak, which for me is about 25 words a minute. I still can't get my fingers to automatically go where they should all the time, especially if I try to type quickly. Here are my recommendations for any who are seriously considering making the switch:

1. If you're a beginning typist or don't type very quickly anyway, learn the Dvorak keyboard.

2. If you suffer from repetitive stress injuries but must continue to type (have you considered speech recognition?), learn the Dvorak keyboard.

3. If you're an accomplished QWERTY typist, think twice about taking on the challenge. In the end, the effort may be worth it (I've decided to stick with it), but getting proficient will cost you in time, effort, and exasperation.

4. Take it slow. You won't get fast overnight, so don't try. Initially, aim for accuracy. Speed will come with practice.

5. Use a good typing tutor program to help you learn. Don't use Mavis Beacon Teaches Typing, which no longer supports Dvorak. There's a pretty good free program (KP Typing Tutor) here:

http://www.fonlow.com/zijianhuang/kp/

A program with more thorough instruction and fancier features is TypingMaster, which you can try and buy here:

http://www.typingmaster.com/

6. Practice at least half an hour every day. If you do more than that, take breaks frequently.

7. After your speed reaches about 25 words a minute, avoid working in QWERTY. Otherwise, your fingers will get confused. At least mine do.

8. Try to learn during a time when your workload is light. If deadlines are looming, your reduced typing speed will drive you crazy.

Good luck!

_________________________________________

READERS WRITE

Last week's newsletter explained how to select text vertically using the mouse. Hilary Powers responded:

For the mouse-phobic, there's an easier way: Press and release Shft-Ctrl-F8. The insertion point changes to a long thin line, after which you can select your rectangle with the arrow keys - much more comfortable.

Katie Lewis sent the same tip with some additional information:

You know F8 is an alternative to holding down the Shift key for selecting text? It works well with the cursor keys, so is much more controlled than using the mouse. Ctrl+Shift+F8 does the same thing for vertical selection. (Esc to turn off.)

Thanks to Hilary and Katie for the useful tips.

_________________________________________

RESOURCES

Last week's newsletter listed some document comparison programs to replace the "retired" CompareRite. Both Donna Payne and Bill Rubidge wrote to recommend DeltaView, which you can learn about here:

http://www.workshare.net

Bill noted:

The only downside is that DeltaView is focused on enterprise users (particularly law firms), so they don't offer single-user licenses. They've considered this, but have not accepted it so far because they feel the customer support would cost them too much. Perhaps if enough of us asked about single-user licenses...

As an alternative, examdiff is okay, I also recommend that your readers visit http://www.componentsoftware.com/products/ and take a look at CSdiff and HTMLdiff.

And then again, you can always just stick with your current version of Word. I'm a big fan of downgrading instead of upgrading.

Thanks to Donna and Bill for this helpful information.

Vertical Selection

You probably use your mouse to select text in Word all the time, but did you know you can select vertically as well as horizontally? For example, let's take the following text as an example:

Circumstance does not make the man;

it reveals him to himself."

(James Allen, As a Man Thinketh)

You can easily select just the first few words of each line down through the whole quotation, something like this:

Circumstance does

it reveals him to

(James Allen, As

To do so, just hold down the ALT key (PC) or OPTION key (Macintosh) as you select your text with the mouse. After you've made your selection, you can cut, copy, format, and so on.

Please note that if you're going to cut or copy and then *paste* the text somewhere else in your document, you must make enough room for the multiple lines to fit. They won't just go in at the insertion point the way regular text does. If you don't make enough room (by inserting carriage returns), the text will get mixed up with existing lines of text. This is difficult to explain, but if you try it you'll see what I mean.

Selecting text vertically is especially handy if you need to copy or format the first part of a list. I hope you find it useful.

____________________________________________________

DVORAK KEYBOARD UPDATE

Last week's newsletter discussed the Dvorak keyboard (a more efficient layout than the traditional QWERTY keyboard). I've been practicing about half an hour a day for a week now and thought some readers might be interested in my experience. Here's what I've learned so far:

1. Practicing on my own the first couple of days produced uneven results, so I decided I needed a more structured approach. Since then I've been practicing with the MasterMind Typing Tutor, available at no charge from DvortyBoards (check out their keyboards!):

http://www.dvortyboards.com/index.html

A program with more thorough instruction and fancier features is TypingMaster, which you can try and buy here:

http://www.typingmaster.com/

2. At first I had to consciously think about what finger to use on each key, with a fingering chart to help me. After about three days, though, my fingers *mostly* knew where to go on their own, although sometimes I'd have to think about it. At the end of the week, this is still true.

3. I've had trouble learning particular keys, especially I, D, X, and B, all of which require stretching the index fingers outside the home position.

4. I now have considerable accuracy on the Dvorak keyboard if I type *slowly* (about 15 words a minute). As soon as I try to speed up, my fingers revert to their 35 years of QWERTY training.

5. Typing whole words is much more difficult than typing individual letters, because my brain is accustomed to instantly converting words into keystrokes in QWERTY. I'm still on the letter-by-letter level with Dvorak.

6. The Dvorak keyboard is exceedingly easy on the fingers since it doesn't require the constant stretching and moving needed with QWERTY.

Next week, I'll give you a final report with some recommendations about learning the Dvorak keyboard.

_________________________________________

READERS WRITE

David Stacey wrote, "The general public react to the use of different colors when marking their documents. Do you have any recommendations about the choice of colors? (Too much red seems to cause them stress.) I'm now using red for strikethrough and blue for insertions."

I think this is a good question, and I like the idea of using blue for insertions. How about using 25% gray for strikethrough? (You have to scroll down in the list of colors to see this one.) That would help communicate the idea that the text has been deleted because it would be lighter than the surrounding text.

Here's an exchange between subscriber Miriam Bloom and me:

MIRIAM: When comparing (merging) documents in MS Word for Windows XP, is there a way to format different font colors for the "delete" vs. the "add" function? I used to be able to do it in older versions of both Word and WordPerfect, but now I can't figure out how to do it in either.

JACK: As far as I can tell, Microsoft has removed this feature from Word 2002, which makes me very grumpy indeed. In fact, I'm unhappy with nearly all of their "enhancements" having to do with merged documents and tracked changes. If you like, you can read my rant on the subject here:

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

MIRIAM: Moreover, I can't figure out how to do it after the fact because find-and-replace doesn't seem to work on merged documents.

JACK: That's because "red underlined" (for example) for revision tracking is a different kind of formatting. If you simply format some text as red underlined using the Font dialog, you should be able to find and replace it, even in a merged document.

MIRIAM: Is there an alternative way of searching it--or any way at all of getting around the color problem short of going through documents and redlining them manually?

JACK: You can use Word's Reviewing toolbar to go to each new change, but this won't alter appearance. You could go back to Word 2000, which allows you to use separate colors for insertions and deletions. That's what I've done. 🙂

Thanks to David and Miriam for their questions.

_________________________________________

RESOURCES

Many editors have used the popular CompareRite program to identify and display document revisions. Unfortunately, CompareRite has been "retired" by LexisNexis. You can read about this here:

http://www.lexisnexis.com/custserv/compare.asp

Fortunately, alternatives are available. You can learn more here:

http://www.dqsnet.com/documentcontrol.html

http://www.prestosoft.com/examdiff/examdiff.htm

Editors and Preditors

In our shop, we have several editors (who edit books, natch) and a few editorial assistants (who proofread, check corrections, and so on). We edit in Microsoft Word, and most electronic manuscripts require a lot of cleanup. The editors do much of this themselves--turning multiple spaces into single spaces, changing double hyphens into em dashes, and so on. But I keep thinking that many such tasks could be relegated to someone less expensive than a full-fledged editor--sort of a "pre-editor," or, just for fun, "preditor."

The preditor's job would be to get electronic manuscripts ready for the editors, who could then focus more fully on editing. The preditor could do such things as:

1. Convert files (WordPerfect to Word) as needed. I recommend using a dedicated file-conversion program, such as MacLinkPlus or Conversions Plus:

http://www.dataviz.com/products/maclinkplus/

http://www.dataviz.com/products/conversionsplus/index.html

2. Combine chapter files into one book file or split a book file into chapters, depending on how your editors like to work. Editor's ToolKit can automate this for you:

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

3. Rename files to fit your house standard, such as job number_chapter number (3298_0001.doc). If you don't have such a standard, you should create one. It will help streamline the publishing process and simplify archiving.

4. Apply to the files a document template formatted especially for editing:

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

5. Apply styles (or codes) to specify document structure and typesetting levels:

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

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

6. Fix messed-up notes:

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

7. Find and replace common editorial and typographical problems. FileCleaner can automate much of this:

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

8. Use wildcard and other searches to fix inconsistencies in editorial style, consulting with the project editor as needed. MegaReplacer makes this a snap and even includes scripts to fix common editorial problems:

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

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

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

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

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

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

9. Run a spell check; it won't catch misused words, but it will catch the most elusive of typos:

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

At this point, those files should be squeaky clean--except for the actual editing, which editors can now do without worrying about such picayune problems as whether or not commas are inside or outside of quotation marks. Yes, I know that editors can't ignore such things, but a preditor can help free up editors' time so they can focus mainly on clarity, meaning, and communication.

_________________________________________

READERS WRITE

Last week I explained how to overstrike characters by condensing character spacing. Karen L. Bojda sent an alternative method:

To overstrike two or more characters (say, the / and e of your example), you can also use an "equation" field with the overstrike switch, O:

{EQ O(/,e)}

which can be inserted with the Insert > Fields... command (at least in my old Word 98 for the Mac). The overstrike field does have the advantage that its formatting can't be accidentally removed, but the overstruck (overstricken?) characters produced this way are more or less centered. Your condensed-text method allows finer control over the extent of overlap. Plus your method allows overstriking a backslash, which mucks up a field.

Karen L. Bojda

Bojda Editorial & Writing Services

kbojda [at symbol] insightbb.com

http://www.bojda.com

Yehuda Yoel Zimmerman also suggested using this method.

Thanks to Karen and Yehuda for the helpful tip.

_________________________________________

RESOURCES

Last week, I mentioned the Microsoft Word Legal User's Guide for Word 97 and 2000, but there's also a version for Word 2002! Donna Payne wrote:

On the Legal User Guide, the link for Office XP/Word 2002 is:

http://office.microsoft.com/downloads/2002/wdLegalG.aspx

Our company was a member of the Microsoft Legal Advisory Council and authored both the Word 97/2000 and Word 2002 versions of the Legal User guide for Microsoft. Your readers may want to take a look at our books, Word 97 for Law Firms, Word 2000 for Law Firms, and Word 2002 for Law Firms for more detailed information.

Sincerely,

Donna Payne

President

Payne Consulting Group, Inc.

www.payneconsulting.com

Thanks to Donna for this valuable information.

Superscript Ordinals

In many of the manuscripts I edit, the author has used superscript for ordinal numbers, entering 1st, 2nd, 3rd, and 4th (and so on) as 1^st^, 2^nd^, 3^rd^, and 4^th^ (the carets represent superscript here). Why? Because Microsoft Word by default inserts ordinal numbers using superscript--one of its many "helpful" features, which I explain how to turn off here:

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

But if the superscript ordinals are already in the manuscript, you can't just turn them off. You have to figure out another way to get rid of that superscript. One way is to find and replace it (Edit > Replace) with "not superscript" (as Word phrases it). That will work fine unless the manuscript has superscript formatting you want to keep, in which case you have to find and replace each superscript item individually. Even that isn't so bad--unless the manuscript has footnotes or endnotes, in which case you might have to check hundreds of superscript reference numbers during your search. Ugh.

Faced with that very problem in the past few weeks, I figured out a simple way around it:

1. Make a backup copy of your document (always, always, always).

2. Click "Edit > Replace" to display the Replace dialog.

3. In the "Find What" box, enter the following wildcard string:

[!^02]

4. Format the "Find What" box as Superscript. The easy way to do this is to press CTRL + SHIFT + = (on a Macintosh, click the "Format" button, then "Font," and put a check in the "Superscript" checkbox; you may first need to click the "More" button).

5. Format the "Replace With" box as Not Superscript/Subscript. The easy way to do this is to press CTRL + SHIFT + = two times in a row (on a Macintosh, click the "Format" button, then "Font," and clear the "Superscript" checkbox).

6. Put a check in the "Use Wildcards" checkbox. (You may need to click the "More" button to make the checkbox available.)

7. Click "Replace All" (or "Find Next" and "Replace" if you want to try a few manually).

That will get rid of all superscript *except* on note reference numbers. The secret, of course, is that [!^02] code, which tells Word not to include note reference numbers in its search. You can learn more about searching with codes and wildcards here:

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

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

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

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

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

_________________________________________

READERS WRITE

Code Clarification

Amanda Lucas wrote to ask about using raw codes in Microsoft Word (as discussed in last week's newsletter) as opposed to the Reveal Codes feature in WordPerfect. Thinking that others might also be wondering about this, I offer the following clarification:

Working with raw codes in Word is a completely different thing than working with Reveal Codes in WordPerfect. You might think of them as equivalents, as in this diagram:

Codes in Microsoft Word <---> WordPerfect Reveal Codes

But they're not. A better way to think about using codes in Microsoft Word is like this:

Coding systems (XML, XPressTags, TeX tags, Ventura tags, etc.)

|
|

v
Rendering systems (Web browsers, QuarkXPress, TeX, Ventura, etc.)

Quite a few publishers, especially in academic and technical settings, work directly with codes (using basic text editors such as emacs) and then render their files into presentation documents (typeset docs, PDFs, etc.) using a separate program. I was trying to explain that Microsoft Word, too, could be used in that way. WordPerfect's Reveal Codes feature merely shows the coding underneath the program's WYSIWYG text. Working with raw codes, on the other hand, is a way to get specific about document levels and structure. It's not a substitute for Reveal Codes, which Word doesn't need if used correctly (in other words, if formatting is done with styles rather than applied directly to text).

Overstriking Characters

David M Varner wrote:

"In the course of organizing some recent revisions, some text in one of the documents required a strikethrough. It occurred to me that strikethroughs other than a horizontal line would be handy, slashes perhaps, depending on the situation. My question is this: Is there a way in MS Word to overstrike any character with any other character? This is one thing you can do using a typewriter that you can't, as far as I know, do on a computer."

There is a way to overstrike characters. You can condense the spacing between the characters to the point that the characters overlap. Here's how:

1. Type the two characters, such as "/e".

2. Select the two characters.

3. Click "Format > Font."

4. Click the "Character Spacing" tab.

5. In the "Spacing" list, select "Condensed."

6. In the "By" list, click the arrows until you've got the characters the way you want them. You can see a preview at the bottom of the dialog box.

7. Click the "OK" button.

Thanks to Amanda and David for their questions.

_________________________________________

RESOURCES

The Microsoft Word Legal User's Guide contains "step-by-step instructions to help legal users accomplish the tasks necessary to build robust legal documents in Microsoft Word 97 or Microsoft Word 2000," but much of the information here will be useful for other Word users as well:

http://www.addbalance.com/usersguide/

Raw Codes

@Body:You probably think my email program has gone wacko, inserting codes rather than applying formatting. But it hasn't. I'm just trying the technique described in this article--marking formatting with raw codes. Why would anyone want to do that? Consider this:

@ListFirst:1.Text formatting is misleading. It may look nice, but it comes with a price--the sacrifice of structure and control to appearance. Is your heading formatted with Heading 2 paragraph style, or is it formatted directly as Arial 14-point bold? The difference may not be immediately apparent. With codes, you know.

@ListMiddle:2.Using codes forces you to resist the "easy fix" of directly applied formatting. Come on, admit it: You sometimes center a heading with CTRL + e rather than modifying the paragraph style as you should. I know I do. But if I use raw codes, I don't even have to think about it. I just enter "@Heading 3:" and start typing away. My guilty feelings are gone (sob!).

3.Using codes is just plain easier than mucking about with styles and fonts and formats all the time. It's a simpler way to live. Try it! You might be surprised at how much you like it. If you're really going to make the attempt, you might want to record macros that insert your most common codes and then assign those macros to toolbar buttons or keyboard combinations.

4.Using codes for special characters means there's no more worrying about conversion problems from platform to platform.

5.Using codes ensures greater consistency from document to document--at least it does if you keep using the same codes. Ensuring consistency of styles is more difficult. Which ones are yours? Which ones did Word sneak in when you weren't looking? BodyTextUgly? Where did that come from?

6.Using codes makes it easy to tag your text by function and structure rather than by appearance. For example, instead of using a Heading 1 style, you can tag your text as @ChapterHead:, which actually says what your text is being used for.

7.Using codes means you can work in a simple text processor when you don't have access to Microsoft Word.

8.Using codes makes your formatting human readable! That's pretty remarkable, when you consider all of the hidden, proprietary formatting systems in the world.

@ListLast:9.Using codes makes it easy to translate your formatting into a variety of other formats: HTML. XML. Even Microsoft Word.

@Body:"And how," you ask, "can I turn codes into Microsoft Word formatting?" With our RazzmaTag program, which you can learn more about here:

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

One of the most popular academic typesetting programs, TeX, is built around the concept of working directly with codes and then applying formatting based on those codes. Other programs, too, can import coded documents, including QuarkXPress, PageMaker, and FrameMaker, and many publishers take advantage of that fact, asking their editors to work directly with codes. If you've never considered this possibility, now you can add it to your bag of tricks.

_________________________________________

RESOURCES

Allin Cottrell provides an excellent and informative rant on the whole subject of separating content from presentation. You'll find it here:

http://ricardo.ecn.wfu.edu/~cottrell/wp.html

A good place to learn more about TeX (which, by the way, is *free*) is the TeX User Group Home Page:

http://www.tug.org/

Yes, it is possible to "reveal codes" in Microsoft Word. Interested? Check out CrossEyes, from Levit & James:

http://www.levitjames.com/crosseyes/crosseyes3.htm?lid=google

Editing Notes Alphabetically

This week I've been editing notes--4,028 of them to be exact. And boy, were they a mess--a garbled collection of inconsistency and error. They looked something like this:

Jones, Sunlit Land, 24.

Era of Sand, Jan. 1953, 59.

Today's News, April 17, 1965, 3.

Jones, Sunlit land, 33.

Era of Sandy, January 1953 20.

Jones, Sunlit Land, 78.

As I worked through them, I kept wishing I had a way to sort them alphabetically, so they'd look like this:

Era of Sand, Jan. 1953, 59.

Era of Sandy, January 1953 20.

Jones, Sunlit Land, 24.

Jones, Sunlit land, 33.

Jones, Sunlit Land, 78.

Today's News, April 17, 1965, 3.

Then I could easily compare notes that cited the same source and make sure everything was consistent. But how? Suddenly the solution struck me. (No, it didn't hurt.) I could put the notes into a sortable table. Since the notes were embedded, automatically numbering ones, I'd need my trusty NoteStripper program to strip them out as text. (If they had already been text at the end of the document, I could have put them into a table without first using NoteStripper.) Anyway, here's the procedure:

1. *Back up your document* in case something goes wrong.

2. If you've been working with Revision Tracking turned on, turn it off and make all revisions permanent. Otherwise, you'll run into problems with a bug that refuses to actually delete notes when Revision Tracking is on.

3. If you're not already working in Normal view, make the switch (View > Normal).

4. Open the notes pane (View > Footnotes).

5. With your cursor at the top of the notes pane, click "Edit > Replace."

6. In the "Find What" box, enter "[^013]([!^02])" (carriage returns not preceded by a note number; don't include the quotation marks). Yes, this will work on a Macintosh.

7. In the "Replace With" box, enter "@@@1" (again, without the quotation marks).

8. Put a checkmark in the "Use Wildcards" (or "Use Pattern Matching") checkbox. (You may have to click the "More" button to make this available.)

9. Click "OK" to make the replacements. Now all of your notes are (temporarily) just one paragraph long.

10. Use our NoteStripper program to strip notes to text. For note number format, select "Number with period and tab." When you're finished, all of your notes will be (unembedded) text at the bottom of your document.

11. Select all of the notes.

12. Click "Table" and then "Convert Text to Table." Set "Number of Columns" to 2. Set "Separate Text At" to tabs.

13. Click the "OK" button.

You should now have a table full of numbers and their corresponding notes. To sort the table alphabetically:

1. Your table should still be selected from step 13, above. If you've moved your cursor so it's no longer selected, put your cursor in the table and select the table (Table > Select Table). *Don't skip this step.* (I'll explain more below).

2. Click "Table" and then "Sort Text."

3. In the "Sort By" box, select "Column 2," which is the column holding your note text.

4. In the "Type" box, select "Text."

5. Click "Ascending" and "No Header Row."

6. Click the "OK" button.

Now your notes should be sorted alphabetically, and you can edit to your heart's content. (If your paragraph formatting is double spaced, you may want to change it to single spaced.) This is a pretty efficient way to work. You can easily spot typos or discrepancies in citations just by looking at the length of the lines:

10142 Jones, Sunlit Land, 24.

11773 Jones, Sunlit land, 33.

10044 Jones, Sunlit Land, 78.

If this weren't a monospaced font (sorry), the second line would be a little shorter than the other two, so you'd know something is off. Ah, there it is--that lowercased l on "land" should be capped.

You can also sort your notes numerically, if you want to look at them from that angle:

1. Put your cursor in the table and select the table (Table > Select Table). *Don't skip this step.* (I'll explain more below).

2. Click "Table" and then "Sort Text."

3. In the "Sort By" box, select "Column 1," which is the column holding your note numbers.

4. In the "Type" box, select "Number." (If you select "Text," your note numbers won't sort properly.)

5. Click "Ascending" and "No Header Row."

6. Click the "OK" button.

You can switch back and forth between alphabetical and numerical order as needed. Just be careful *not* to sort one column at a time (or change any of the note numbers--avoid globally finding and replacing numbers as you edit). If you do, you'll lose the correspondence between note numbers and their notes, which would be very, very bad. (Hence my emphasis on selecting the whole table before sorting. You kept that backup, right?) One way to avoid this entirely is to select the first column and format it as hidden, but then, before reembedding your notes (as explained below), you'll need to select the table and turn off the hidden formatting. Also, don't delete the @@@ markers that indicate paragraph breaks; you'll need them later to restore the breaks.

After you've finished editing your notes, you'll need NoteStripper again to get them back into your document as embedded, automatically numbered notes. Here's the procedure:

1. Select the table of numbers and (now-edited) notes (Table > Select Table).

2. Turn the table back to text (Table > Convert Table to Text; Separate Text with Tabs), which will give you a number and a tab preceding each note.

3. Use NoteStripper's "Text to Notes" feature to turn the text notes into embedded ones (see the documentation for instructions).

4. Open the notes pane (View > Footnotes).

5. Find "@@@" and replace with "^p" to restore your carriage returns.

That's it! If you're ever faced with a bunch of notes that need to be wrestled into submission, maybe this technique will help you as much as it did me. If your notes are simply text to begin with (not embedded), you can use the technique without NoteStripper.

You can learn more about NoteStripper (a terrific program) here:

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

_________________________________________

READERS WRITE

Francesca Flynn sent a few more thoughts about ideal editing software. She wrote:

A feature I'd love for copyediting: A "Style Chooser," not just a ms template, but complete grammar- and style- checkers for commonly used editorial styles such as Chicago Manual of Style and American Psychological Association. I'd love to be able to toggle a switch to "Chicago, 1st preferences" to have "extra" commas (per open-style punctuation) and so on be flagged.

I came across another "ideal software" idea -- something I'd like fixed in Word, anyway. (I use Word 97): I appreciate the dialog box "Do you want to save the changes you made to xxx.doc?" But I wish I could respond with, "I don't know -- were they important, or did I accidentally lean on the space bar?" If Microsoft declines to offer the necessary AI (artificially intelligent entity) as a free upgrade (to overwrite Clippy!), I would settle for another button in the save-changes dialog box: "Display changes." This would be especially helpful when I've had several interrelated documents open at once.

Francesca Flynn

Writing & Editing

Sebastopol, California

fkflynn@sonic.net

Thanks to Francesca for her comments.

_________________________________________

RESOURCES

If you're interested in automating your notes and bibliographic references, you might want to investigate the EndNote software, which you can learn about here:

http://www.scisoftware.com/products/endnote_details/endnote_details.html

EndNote isn't the only game in town, however, although it is the best known. To learn about other contenders, see the overview of personal bibliographic software here:

http://info.ox.ac.uk/ctitext/service/workshop/bib-overview.html

Razzmatag

I'm excited to announce the release of our new program, RazzmaTag! Cute name, but what does it do?

Well, do you need to tag characters and formatting in Microsoft Word so your documents can be imported into a typesetting program?

Do you ever need to turn typesetting tags into formatting in Word?

What? You never work with tags? Then how would you like to turn directly applied formatting (such as Baskerville 26-point bold centered) into a Word style (such as Heading 1)?

If you need to do any of those things, you need RazzmaTag. RazzmaTag is a universal tagging utility that finds formatting in Microsoft Word and marks it with tags for use in QuarkXPress, Ventura, PageMaker, TeX, or pretty much any other typesetting program. As an extremely simple example, RazzmaTag can find text in italics and mark it with italic tags, like this: [I]italics[I].

RazzmaTag can also do the reverse, finding tags and changing them to formatting, so if you have old proprietary typesetting files, you can now convert them to Microsoft Word documents. That's also the key to converting directly applied formatting into styles: tag the formatting, then turn the tags into styles.

In addition, RazzmaTag can find and tag special characters. For example, you could have it find em dashes and replace them with tags. RazzmaTag can do all of this in a single document, all open documents, or all documents in a folder.

To use RazzmaTag, you prepare a "master list" that tells the program what formatting or characters to find and how to tag them, which means you're always in control. It also means you're not limited to certain tags but can use anything you need. For example, let's say you want to import a document into QuarkXPress. A simple master list might look like this (consult your Quark manual for the tags you need):

Body|@Body:^&+P

Emphasis|<@Emphasis>^&<@$p>+A

it|^&+F

The first line tells RazzmaTag to find text formatted with the Body paragraph style (+P) and replace it with the Quark tag @Body: followed by whatever text was found (^&).

The second line tells RazzmaTag to find text formatted with a character style (+A) named Emphasis and surround it with the Quark tags <@Emphasis> and <@$p>.

The third line tells RazzmaTag to find text in italic character formatting (+F) and surround it with Quark italic tags, and .

After you run RazzmaTag using that list, your document text will look something like this:

@Body:This is some text tagged <@Emphasis>beautifully <@$p> by the Editorium's new program, RazzmaTag!

Other kinds of tagging (or untagging) work in much the same way.

I'm particularly excited that I can now take an author's unstyled document, tag directly applied formatting, and then convert those tags to styles. RazzmaTag will save hours of applying styles by hand.

If you're using our QuarkConverter program, you know how handy it is, but it's limited to tagging files for QuarkXPress. RazzmaTag will do much more. If you're one of those Ventura users who keep asking for help, here's the program you've been wanting. I hope you enjoy RazzmaTag!

You can learn more about RazzmaTag and try it free of charge here:

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

_________________________________________

READERS WRITE

Last week's article about what the ideal editing software might look like brought some interesting responses.

Jeanne Pinault wrote:

Hi--great question!

I'd like the software to use publishing terms, like flush left, recto & verso, etc., and not make me translate computer language into my language.

I'd like Word to have something like WordPerfect's Reveal Codes, on demand--when you can't undo something because you don't know how you did it.

I'd like to have software that would undo authors' fancy formatting and give me plain text at a keystroke (Quark coded, of course, since we're dreaming, for ital, en dashes, etc.), as required for some publishers. (For all others, there's Editor's ToolKit!)

That said, I am devoted to Word 97 and do not intend to upgrade EVER. But I might start over with something perfect.

Steve Hudson wrote:

ME! ME! PICK ME SIR!!!!

RIGHT. Fourth division, sweep left. 21st division, cover that hill. Light armored . . . CHARGE!!!

First--C M Y friggin K. I will not harp, I will sit back as the cannons roar and you immediately agree you showed MASSIVE oversight in NOT including this. Consider thyself SPANK-ED! 🙂

Next--custom text run-around-paths.

The ability to create/modify GRAMMAR rules.

A proper, unlimited, compressed user spelling dictionary with decent tools.

Base file format is XML--not some unreadable binary behemoth.

More comprehensive document statistics--such as list hyperlinks/index entries/any field type/any metadata.

Built-in batch processing for documents from the facade.

Reveal ALL codes.

Rajesh Haldipur wrote:

I work with a typesetting service provider, and also provide typesetting and other services using Word. Some case studies of what we have done are available here (http://www.newgenimaging.com/datasheets/word.pdf) and here (http://www.newgenimaging.com/casestudies/xml.pdf) for download. I am also a confirmed user of Word, and a regular reader of the Editorium Update. I haven't purchased the Editorium product because, by the time I did discover the Editorium, I had developed most of the utilities in-house. I thought I would burden you with my tuppence-worth of comments on the wish list, with the backdrop of my experience in this area:

1. Word completion based on previous entries--do you mean something like the "AutoComplete" feature in Excel? That can be used in case tabular matter with large amount of repetitive content is to be keyed in, and the result taken to Word.

2. Re Export to XML We have developed for in-house use (customised for every DTD) the ability to convert XML into a styled, nearly paginated Word files, including loading of figures and formatting of tables. Separately, I have also developed a program to convert a styled Word file to XML based on a DTD, as long as the document is styled using a special template meant for that DTD. I have also built a utility to parse the resultant Word file and get the resultant error log entries hyperlink to the location of the error.

3. Real-time display of the Index We have developed a utility which converts an Excel List of Text of Index Entries (2,3 or 4 levels) and the relevant page number/ paragraph numbers into an Index in Word by a single click of a button. It also appropriately handles special characters, forcing particular Index Entries to appear in an order other than natural alphabetical order, and page ranges. This also generates an XML Index Entry list which verbosely lists every paragraph referenced as separate entries, where paragraph ranges are referenced by the index entry.

4. Some other features we could add to the wish list are:

? Search and Replace facility to allow searching for Widows or Orphans

? Style definition flexibility to allow for

? different specification for Widows and for Orphans

? specifying how many characters permissible before and after hyphen, in addition to hyphenation zone

? many more styles of underlining

? font in embossed and engraved effects besides shadow

? placing special emphasis characters above or below each character of style

? superscript and subscript sizes and positions to be varied as percentage of normal font sizes

? creation of decimal aligned tab to align at a comma or any other character by treating it as the decimal character

? setting a grid for a Reference style and for the base line of another style to snap to the grid of the reference style

? alignment of characters of para to base or top where a few characters in a paragraph are in significantly larger font than others.

? Allow part of a document to be designated at Read Only

? Allow hyperlinking of document content to a particular e-mail

? Support for CMYK as well as RGB colour

? Ability to define a user-definable hierarchy (classification) of styles in a template to classify styles for easier access and maintenance

? Ability to anchor objects to even a character or page and not just a paragraph

? Ability to enter References directly into a built-in bibliographic database and call them in a document (now separately available as third party plug-ins to MS Word)

What might interest you is that these features were not all needs felt and documented by me, but are a partial list of features which I have noticed are available with Open Office, which is a free 50MB download from here. In addition to almost everything that Word has to offer, it supports not one, but two programming languages (its own version of Basic in addition to Java) and hence is arguably more programmable and customisable than Word is with VBA.

David Parton (david.parton@abbeyfield-nottingham.org.uk) wrote:

Great list.

Can I add: Columns that don't rely on sections. I have a document that is in 8 real sections and would like to be able use these sections as references and to print and navigate using these sections, but the document also uses columns and therefore there are actually over 30 Word section breaks making cross referencing very difficult.

Martin Fitch wrote:

If you want to see what a real publishing program can do, check out Interleaf. After working with Interleaf for many years, trying to do half as much in Word with four times the effort is just sickening. Interleaf Corp. was bought out by Broadvision a few years ago, and the product is now called Quicksilver. Here's a link to their datasheet:

Click to access quicksilver.pdf

Thanks to one and all for their excellent insights and ideas!

_________________________________________

RESOURCES

Wordmeister Steve Hudson sent a terrific tip for serious Word users:

As a lot of your newsletter specifically deals with Microsoft Word, I thought the following resource might be of interest. It's www.kbAlertz.com; one of the best features is a regular mailout of the new Knowledge Base articles posted by Microsoft. I am trying to keep a running commentary on the Word 2000 ones via my "daily" entries in my blog for those folk who don't want to have to wade through MS guff to decipher what's the latest info.

You can check out Steve's blog here:

http://blog.tdfa.com

Ideal Software

With some customization, Microsoft Word makes a pretty good tool for editing. The fact that it can be customized, in fact, is one of its finest features. I also like its use of styles, spell-checking, wildcard Find and Replace, and notes. There are also plenty of things I *don't* like, including Word's general "bugginess" and over-helpfulness. So I started thinking about what would make the ideal software for use in a publishing environment. What would that software look like? What features would it have?

So far, I have the following list, which includes some features that are already part of Word, others that are part of our Editorium software, and others that haven't been invented yet or are available in other programs:

1. Features designed specifically for editing, such as:

a. Batch Find and Replace using regular expressions (wildcards).

b. Quick and easy navigation.

c. Transposition of words and characters.

d. True title-case conversion.

e. Revision tracking and control.

f. Single-sourcing.

g. Automatically numbering notes and lists (that actually work).

h. Automatic backup and archiving.

2. Typesetting features:

a. Excellent hyphenation and justification.

b. Notes that can break over pages and be set in columns independent of body text.

c. Master pages for setup of headers, footers, folios, and so on.

d. Support for automatic ligatures, old-style numbers, and true small caps using master fonts.

e. Paragraph, character, and table styles.

f. "Long-document" features such as cross-referencing, indexing, and tables of contents.

g. "Book-building" features (in other words, a useable Master Document feature).

3. Indexing features with:

a. Embedded entries.

b. Display of entries sorted by page or alphabetically.

c. Real-time display of the index as it's being written.

d. Sorting word-by-word or letter-by-letter, with the ability to ignore introductory words and punctuation.

e. Word completion based on previous entries.

f. Automatic checking of cross-references.

4. The ability to export as:

a. PDF.

b. HTML.

c. HTML Help.

d. XML.

5. Cross-platform compatibility.

I know, I know: Dream on. But wouldn't it be great to have one program that did it all?

What would you add to the list? What would your ideal publishing software look like? Please let me know and I'll publish your response in the near future. You can send your ideas here: mailto:editor [at symbol] editorium.com.

_________________________________________

RESOURCES

Jacci Howard Bear has a great Web page on choosing desktop publishing software at About.com. Lots of reviews, comparisons, and other good information:

http://desktoppub.about.com/cs/softwarechoice/

Automated Letter-by-Letter Index Sorting

Last week's newsletter explained how to sort Word's index entries letter by letter rather than word by word:

Using "Found" Macros

But it didn't explain how to do it in an automated way. So here's an automated way, using wildcard Find and Replace. You can learn more about using wildcards in some of our past newsletters:

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

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

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

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

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

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

Here's the procedure, which you can record as a macro for future use. Or, better yet, just use the prerecorded macro I've included at the end of this article. Work through the procedure if you want to know more about using complicated searches, or if you just want to see how my devious little mind works. (There's probably a better way to do all this using Visual Basic for Applications, but that's a subject for another day.)

1. Make sure your index entries are visible by showing hidden text (Tools > Options > View > Hidden text).

2. Find the index entries and replace them with themselves colored as, say, plum, so your Find and Replace won't move across entry borders later:

Find What:

(XE "*")

Replace With:

1 (formatted as plum)

Use Wildcards:

Checked

3. Replace escaped colons and quotation marks with arbitrary symbols to be changed back later ("escaped" means they have a backslash in front of them, telling Word to treat them as characters, which is how you can use colons and quotation marks in your index entries!):

Find What:

:

Replace With:

&&&

Use Wildcards:

Unchecked

Find What:

"

Replace With:

@@@

Use Wildcards:

Unchecked

4. Put a colon after main-only (but actually, after all) entries:

Find What:

(XE "*)(")

Replace With:

1:2

Use Wildcards:

Checked

5. Find plum-colored, multiple-word index entries and enter semicolon entries, going from three spaces to one space, which ought to be enough for anybody (and besides, Word can only handle up to five "Find What Expression" wildcards):

Find What:

(XE ")([! :]@) ([! :]@) ([! :]@) ([! :]@): (formatted as plum)

Replace With:

12 3 4 5;2345:

Use Wildcards:

Checked

Find What:

(XE ")([! :]@) ([! :]@) ([! :]@): (formatted as plum)

Replace With:

12 3 4;234:

Use Wildcards:

Checked

Find What:

(XE ")([! :]@) ([! :]@): (formatted as plum)

Replace With:

12 3;23:

Use Wildcards:

Checked

6. Clean up colons at ends of entries:

Find What:

(XE "*):(") (formatted as plum)

Replace With:

12 (formatted as Automatic, which gets rid of all plum)

Use Wildcards:

Checked

7. Restore escaped colons and quotation marks, if any:

Find What:

&&&

Replace With:

:

Use Wildcards:

Unchecked

Find What:

@@@

Replace With:

"

Use Wildcards:

Unchecked

Now move to the bottom of your document and have Word generate your index (Insert > Index and Tables > Index). Well, look at that: The entries are sorted letter by letter. Neat!

If you want to work manually, you can insert a semicolon and alternate spelling after a main index entry to force Word to sort in any way you like. For example, let's say you've got some numbers in your index, ordered like this:

8123

835

86

Ordinarily, that's how they'd sort. But if you edit your index entries like this--

{XE "835;0835"}

{XE "86;0086"}

{XE "8123;8123"}

--you'll make them sort like this:

86

835

8123

If you really wanted to, you could even do something weird like this--

{XE "Zebra;1"}

--and force "Zebra" to the top of your index.

Pretty handy, no? At any rate, you now have an automated way to sort Word's index entries letter by letter. Enjoy!

Here's the prerecorded macro to make index entries sort letter by letter. If you don't know how to use such macros, you can find out here.

'THE MACRO STARTS HERE
Sub IndexEntriesLetterByLetter()
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorPlum
With Selection.Find
.Text = "(XE "")([! :]@) ([! :]@):"
.Replacement.Text = "12 3;23:"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorPlum
With Selection.Find
.Text = "(XE ""*"")"
.Replacement.Text = "1"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ":"
.Replacement.Text = "&&&"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = """"
.Replacement.Text = "@@@"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(XE ""*)("")"
.Replacement.Text = "1:2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorPlum
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(XE "")([! :]@) ([! :]@) ([! :]@) ([! :]@):"
.Replacement.Text = "12 3 4 5;2345:"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorPlum
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(XE "")([! :]@) ([! :]@) ([! :]@):"
.Replacement.Text = "12 3 4;234:"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorPlum
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(XE "")([! :]@) ([! :]@):"
.Replacement.Text = "12 3;23:"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Font.Color = wdColorPlum
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Color = wdColorAutomatic
With Selection.Find
.Text = "(XE ""*):("")"
.Replacement.Text = "12"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(XE ""*):("")"
.Replacement.Text = "12"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "&&&"
.Replacement.Text = ":"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "@@@"
.Replacement.Text = """"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
'THE MACRO ENDS HERE

_________________________________________

READERS WRITE

The newsletter for July 31 explained how to make punctuation easier to see by formatting it as big, bold, and red; the following newsletter offered some reader tips on doing so; and last week's newsletter included a terrific macro by Phil Rabichow to automate the process.

This week, Steve Hudson provides a similar macro as an exercise in Visual Basic programming (and of course, it's useful, too!). It's a toggle, so you'll probably want to put the subroutine named SomeToolbarNameToggleBigPunctuation() on a toolbar button for easy access. You can learn how to do this here:

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

As you look through the macro, pay particular attention to Steve's comments, which explain what's going on. The macro is an excellent example of VBA, including find loops, wildcard matching, range objects, optional parameters, design analysis, and much more. Actually, the whole macro has many left-of-center concepts--for example, a Find that can return nothing yet still not have finished (it picks up the Chr$(7) that marks a table start, which can't be included in the wildcard entry). The macro also nicely changes the cursor and screen updating, and it backs out formatting changes. Steve is a master at this kind of stuff, so get ready to learn something. And why not contact Steve to take care of your custom programming needs?

By the way, you'll note Steve's humor throughout. Here is Steve's commentary, edited slightly by me to fit the context of this newsletter:

The past newsletters found and formatted punctuation by inclusion, which rules out Unicode and the like. So I figured a macro would be better with punctuation by exclusion in order to show up all sorts of strange dweebs.

The second problem was your suggestion to create a temporary style that mucks my document up with no subsequent hint of destruction.

The third was "How do I reverse this?" If I have a formula in character styling and another elsewhere in terminal screen, I can't find this style and kill it dead with a known something else. So I have to transpose my edits to have a safe working practice. Ack.

The fourth problem was not acknowledging No Proofing on styles.

So the first one is easy enough, we simply start the square brackets formula for the find with a ! and then what we are not interested in. Thus the string for a trivial solution is [!A-Za-z0-9^160]. Note the ^160 for the nonbreaking space; Word honours the ole caret at a higher priority than anything else. Basically, this finds anything *except* a letter, a number, or a nonbreaking space, but I've added additional characters in the macro itself.

The second is also easy. We all use STYLES like good little folk, so let's keep those in place and add--oooo--MANUAL FORMATTING. We can hunt it down and undo it easy enough later by resetting that range to its underlying style again, so it's a temporary aberration for our temporary aberration. That's the third taken care of as well.

Now, the fourth and last--is there any way we can tell the Find to do only those styles with proofing set? Err, no. So we have to check this ourselves manually. 🙁 Word's find falls down spectacularly with stuff like this. Easy enough, and should be faster as we are doing less styling work, which is expensive.

Now some little style notes--I prefer to use ranges and let the users have their selection object. It may be faster running selection.finds, dunno, duncare 🙂 It makes the resulting code smaller and easier to read and allows me sick puns--the last being the most important reason of course. What's the use of knowing all this junk if you can't have fun with it, I say. I know that some folks hate nonstandard variable naming, but I like code that is human readable.

Next, always reset stuff back to the way it was. If users do a find, do they want your settings?

'THE MACRO STARTS HERE
Public Sub SomeToolbarNameToggleBigPunctuation()
'Attach this to a button on a toolbar
'we use the toolbar name to start the sub so we know where
'this sub is called from
Static Toggle As Boolean
Toggle = Not Toggle
ProofReadBigPunctuation Toggle
End Sub
Public Sub ProofReadBigPunctuation(MakeBig As Boolean, Optional Scope As Range)
'$--------
Author: heretic [at symbol] tdfa.com
'$Short: If makebig is true, it makes punctuation marks BIG
'to aid proofreading as discussed by Editmeister Jack.
'If makebig is false, it removes this formatting
'$Known issues: Destroys original doc highlighting IF
'highlighting is used in the formatting process.
Dim HomeOnThe As Range 'Our findermatic
Dim Finished As Boolean
Dim Progress As Double 'enough space for calcs in big dox
'Be nice, don't assume system settings
Dim Cursor_pholder As WdCursorType
Dim ScreenUpdating_pholder As Boolean
'frilly bits: change the cursor whilst we work!
Cursor_pholder = System.Cursor
System.Cursor = wdCursorWait
'freeze the screen to speed things up
ScreenUpdating_pholder = Application.ScreenUpdating
Application.ScreenUpdating = False
'This basic technique can be used in as many ways as Bill
'has bux.
'________________________________
'Give our range a document range to hang off.
'The first .dupe is strictly speaking unnecc but a good habit
'to get into with range objects--the second one prevents us
'changing the passed scope without realising it!
'We avoid the other parts of the document by setting our
'ranges parent to be the range that is the content only.
'I regularly use Activedocument.Content too.
'Also note how we deal with no explicit scope being passed
'from that Optional parameter
If Scope Is Nothing Then Set Scope = _
ActiveDocument.StoryRanges(wdMainTextStory).Duplicate
Set HomeOnThe = Scope.Duplicate
'Collapse our range to a point at the start of the doc
'main body content, just like a cursor in a virgin document.
HomeOnThe.Collapse
'We don't have to clearformatting or anything as it's
'a whole new range. Just set up the find
'$Customize: the ! means NOT anything in the following list
With HomeOnThe.Find
'note we don't use If MakeBig = True then
If MakeBig Then 'errant chars
.Text = "[! 0-9A-Za-z^9^12^13^160]" '$Customize
.MatchWildcards = True
Else '$Customize: formatting
With .Font
.Color = wdColorRed
.Bold = True
End With
.Highlight = True
End If
End With
'Get started on a standard manual processing find loop.
While Not Finished
'let the poor user know where we are at
Progress = Int(HomeOnThe.End * 100 / Scope.End)
Application.StatusBar = "Restyling " & Format(Progress) & "%"
'ensure the statusbar change gets through
DoEvents
'the find!
With HomeOnThe.Find
.Execute Replace:=wdReplaceNone
Finished = Not .Found
End With
'Our range is now either null, meaning nothing found
'or it contains a range for us to examine
If Not Finished Then 'we caught one!
If MakeBig Then 'style if proofing on
If Not ActiveDocument.Styles(HomeOnThe.Style).NoProofing Then _
FormatFontGruesome HomeOnThe
Else 'unstyle
HomeOnThe.Font.Reset
HomeOnThe.HighlightColorIndex = wdNoHighlight
End If
End If
HomeOnThe.Collapse wdCollapseEnd 'so we keep moving along
Wend 'finished
'destroy our objects
Set HomeOnThe = Nothing
'reset our changes
Application.ScreenUpdating = ScreenUpdating_pholder
System.Cursor = Cursor_pholder
Application.StatusBar = "Finished"
End Sub
Private Sub FormatFontGruesome(Scope As Range)
'$Short: to make shtuff shtand out shorty, you
'gotta problem wid dat?
'$Customize: don't forget to keep this matched with the
'find requirements for the undo
'I don't like the thought of changing font name
'as that could change the displayed character
'Lets just make it BIG, BOLD and RED on a YELLOW background
With Scope.Font
.Color = wdColorRed
.Bold = True
.Grow
.Grow
.Grow
End With
Scope.HighlightColorIndex = wdYellow
End Sub
Sub TestProofReadBigPunctuationOn()
Dim i As Long
Application.ScreenUpdating = False
Documents.Add
DoEvents
For i = 27 To 1200
Selection.InsertAfter ChrW(i)
Next i
ProofReadBigPunctuation True
Application.ScreenUpdating = True
End Sub
Sub TestProofReadBigPunctuationOnSimple()
'run this on any trial doc to be sure
ProofReadBigPunctuation True
End Sub
Sub TestProofReadBigPunctuationOff()
ProofReadBigPunctuation False
End Sub
'THE MACRO ENDS HERE

Many thanks to Steve for the macro and for the tutorial.

_________________________________________

RESOURCES

If you're looking for indexing resources, don't miss those supplied by the School of Library, Archival and Information Studies at the University of British Columbia:

http://www.slais.ubc.ca/resources/indexing/index.htm

Sorting Index Entries Letter by Letter

If you've used Microsoft Word's Index feature, you know that Word alphabetizes index entries word by word, like this:

New Deal

New World

Newborn

News release

Most indexers and publishers, however, prefer to sort index entries letter by letter, like this:

Newborn

New Deal

News release

New World

Is there a way to get Word to sort entries in this way? Yes--with some manual intervention. (If you've never used Word's indexing feature, you might want to read about it in Word Help before continuing.)

A typical Word index entry looks like this--

{XE "New Deal"}

--and it will sort in word-by-word order.

However, if you add a semicolon to the entry, followed by a letter-by-letter spelling (in other words, a spelling that omits the space between words), you can make the entry sort letter by letter. (In case you're wondering, this feature isn't documented in Word Help; you have to dig for it on Microsoft's Web site.)

The edited entry should look like this:

{XE "New Deal;NewDeal"}

So for our other examples above, the edited entries would look like this:

{XE "New World;NewWorld"}

{XE "Newborn"}

{XE "News release;Newsrelease"}

("Newborn" doesn't need editing, since it's already just one word.)

If we then have Word generate an index using those entries, they'll be sorted letter by letter, like this:

Newborn

New Deal

News release

New World

Neat!

But now I'm wondering: Is there an automated way to edit those index entries?

[Offstage, right: Loud clanks and clunks as your correspondent rifles through his toolbox.]

Hmmm. Here's something that *might* do the job. I'll try it and get back to you in about a week.

_________________________________________

READERS WRITE

After reading last week's article "Glorious Color," Word expert Steve Hudson wrote:

I *knew* I had an unsettled feeling about your post. It's gelled.

#1: H9 sure - but yellow on white?

#2: Printing on a black and white printer...

After reading Steve's note, I could see where it might be easy to miss what I had in mind, so here's a clarification:

#1: H9 sure - but yellow on white?

DARK yellow, which looks pretty good on screen. Regular yellow, as Steve points out, doesn't work well.

#2: Printing on a black and white printer...

The point is that you use the colors only while editing on-screen. When you're ready to print, you attach the *real* template for the final look--and then print.

Thanks to Steve for helping me clarify things.

After reading our article about making punctuation big and bold, Phil Rabichow wrote:

I enjoyed your technique for making punctuation stand out for those of us, er uh, those whose eyes may not be the sharpest (or to avoid eyestrain). I took your idea and expanded on it. I created a macro that would:

1. Create a character style called Standout that was Times New Roman, 18 points, bold, and red.

2. Handle the error in case the style already existed.

3. Replace all punctuation marks in one fell swoop with the new style.

Because of the error handling in 2. above, you can run the macro, add text with additional punctuation, and run the macro again. Also, instead of doing successive Find/Replace operations, it uses wildcards and Finds: [.,:;"'""?!] i.e., all types of punctuation. The backslash in front of the question and exclamation marks finds those characters. The macro also finds all quotes (") and apostrophes. Although it doesn't show in an email, what appears to be 7 apostrophes are really 1 set of quotes, 1 apostrophe, 1 opening smart quote (Alt+0147) and 1 closing smart quote (Alt+0148). [On a Macintosh, the character numbers would be 210 and 211.] Replace contains: ^& (the operator for Find What Text) and is formatted for the Standout character style.

The macro is:


Sub BigPunctuation()
' BigPunctuation Macro
' Macro recorded 8/11/02 by Phil Rabichow
' Creates Standout style & replaces punctuation
' of selection with large red bold font
'
On Error Resume Next
ActiveDocument.Styles.Add Name:="Standout", _
Type:=wdStyleTypeCharacter
ActiveDocument.Styles("Standout").BaseStyle = _
"Default Paragraph Font"
With ActiveDocument.Styles("Standout").Font
.Name = "Times New Roman"
.Size = 18
.Bold = True
.Color = wdColorRed
End With
With ActiveDocument.Styles("Standout").Font
With .Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
.Borders(1).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
' Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = _
ActiveDocument.Styles("Standout")
With Selection.Find
.Text = _
"[.,:;""" & ChrW(8220) & ChrW(8221) & "'?!]"
.Replacement.Text = "^&"
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

Note that this macro will apply to a selection in case you only want to change some of the punctuation. If you remove the apostrophe before the line

Selection.HomeKey Unit:=wdStory

the macro will work on the entire document.

Thank you again for your time and a wonderful publication.

Thanks to Steve for the terrific macro! If you don't know how to use macros like this one, you can find out here.

And you can learn more about improving the visibility of punctuation (including how to get the big, bold punctuation back to normal) here:

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

_________________________________________

RESOURCES

The American Society of Indexers is "the only professional organization in the United States devoted solely to the advancement of indexing, abstracting, and database building." Their site has lots of links to indexing and publishing resources and, of course, tons of information about indexing:

http://www.asindexing.org/site/index.html