Jack Lyon

Fixing Bad Notes

This week I received the electronic manuscript of a book I'm going to edit--a collection of talks presented by various scholars at a symposium. Looking through the first talk, I noticed that the footnotes were a mess. The author had used Microsoft Word's automatically numbering notes, sure enough, but then he'd typed a period after each automatically numbered superscript note number. What *was* he thinking? Those periods after the superscripts sure looked weird. How could I get rid of them? A wildcard search! Here's the procedure:

1. Switch to Normal view (View > Normal) if you're not already there.

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

3. With your cursor at the top of the notes pane, open the Replace dialog (Edit > Replace).

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

(^02).

The parentheses consititute a wildcard "group" containing the ASCII code for automatic note reference numbers. And, of course, they're followed by a period. You can learn more about wildcard grouping here:

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

And you can learn more about searching with codes here:

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

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

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

Why not just use ^f to find the footnote numbers? Because the wildcard search engine will give you an error message if you try.

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

1

That's the "find what expression" code, and it represents whatever was found with (^02)--in other words, a note number. But we've excluded the period since we want periods to go away.

6. Put a check in the "Use Wildcards" (or "Use Pattern Matching") checkbox. (You may need to click the "More" button before this is available.)

7. Click the "Replace All" button.

In my bad, bad document, that did the trick.

I opened the next chapter and looked at the notes first thing. Wow, messier still. Incredibly, this author had used Word's automatically numbered footnotes to create the note reference numbers in the text, but then she'd typed her notes after the body text, leaving the footnotes pane completely empty (except for the now-meaningless note numbers). Good grief! How was I supposed to fix that? Well, at least the note text was intact at the end of the document. Now I had to replace those automatic reference numbers with superscript text numbers. Time to write a macro! Here's the version for Word 97 or higher:

Selection.Find.ClearFormatting

With Selection.Find

.Text = "^02"

.Replacement.Text = ""

.Forward = True

.Wrap = wdFindContinue

.Format = False

.MatchCase = False

.MatchWholeWord = False

.MatchWildcards = False

.MatchSoundsLike = False

.MatchAllWordForms = False

End With

Selection.Find.Execute

Do While Selection.Find.Found

i = i + 1

Selection.TypeText Text:=Str$(i)

Selection.Find.Execute

Loop

If you don't know how to use macros like that one, see the article here.

You may recognize this macro as a "repeating macro," as described in the March 20, 2002, issue of Editorium Update:

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

Here's the version of the macro for Word 6 and 7 (95):

EditFind .Find = "^02", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .Format = 0, .Wrap = 1, .FindAllWordForms = 0

While EditFindFound()

i = i + 1

Insert LTrim$(Str$(i))

EditFind

Wend

The macro finds an automatic footnote reference number (^02), increments a plain old number in the computer's memory (i = i + 1), and then types over the top of the reference number with the incremented number (Selection.TypeText Text:=Str$(i)). *Don't* use this macro on documents that have properly working notes. It will delete the notes (and thus the note text), leaving only superscript numbers in their place.

Running the macro took care of my problem but left me with another: how to turn those text notes into automatically numbered ones so I didn't have to manually renumber as I edited the piece. I could have created a bunch of new footnotes by hand, pasting the note text into each one--if I'd wanted to be inefficient. Luckily, there's a better solution: the "Text to Notes" feature of my trusty NoteStripper program, which I used, and which you can learn more about here:

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

Gritting my teeth, I opened the third article and looked at the notes. Yes, also messed up. This guy had used Word's automatic notes feature but then opened the footnotes pane, *deleted* the note number (an invitation to file corruption if there ever was one), and *manually typed in* note numbers and periods. Grrrr. *Now* what? This one needed drastic measures. I selected all of the notes in the footnotes pane, copied them (they were nothing but text, so why not?), and pasted them at the end of the document. Then I used that macro again to turn the note reference numbers into superscript text. Finally, I used NoteStripper's "Text to Notes" feature to turn the text notes into automatically numbering ones.

And the rest of the articles? About a third of them used notes correctly. The rest were a mess, just like the first three. If you're ever faced with this kind of stuff, maybe this article will help.

_________________________________________

READERS WRITE

After reading last week's article on cross-referencing footnotes (which used gibberish text in the examples), Toni Knapp wrote:

Jack Lyon's information would have been very useful if it had been written in English. What was the purpose of the (foreign?) gibberish? The cross-referencing process made no sense to me.

I replied:

The foreign gibberish is just nonsense text used as an example, so readers don't confuse what the example paragraphs *say* with the text of the article itself. For example, I could have written the examples like this:

This is some text^1 that you might use in your document. When you use that text^2 you'll see what it looks like.^3

But in doing so, there's a danger that readers won't see the text as an example but rather as part of the article itself. So the safer route (and actually the traditional route) is to use nonsense text, like this:

Lorem ipsum dolor sit amet,^1 consectetuer adipiscing elit, sed diam nonummy^2 nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.^3

Sorry if that was confusing. Using nonsense text is actually a publishing tradition that goes back nearly to the time of Gutenberg, when type samples were printed in garbled Latin so that readers would pay attention to what the type samples *looked* like rather than what the type samples said. You can read more about sample text in my newsletter here:

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

Toni responded:

I'm quite familiar with (and use) nonsense text, but primarily as filler material in book dummies, layouts, etc. Used in an example for cross referencing, however, it did not work for me personally. I was too busy trying to decipher the nonsense. :o)

Probably a good point. If you, gentle reader, sometimes use nonsense text, you might want to be sure that it's not confusing in the context where you're using it.

Thanks to Toni for her question and response.

_________________________________________

RESOURCES

Knopf Online offers a great "Tips & Resources" page for "technical writers, Help authors, and other information developers." See especially the article "Coping with Word's Autonumbering 'Feature'" on the right side of the page:

http://www.knopf.com/resources.html

Cross-Referencing Notes

If you're like me, you love Microsoft Word's note feature--in particular, being able to insert or delete a footnote or endnote and have all of the subsequent notes renumber automatically. Have you ever wondered, though, how to create a note reference number that refers to a note that already exists?

For example, let's say the following text is a Word document with notes (I've indicated note reference numbers with carets, like this^1):

Lorem ipsum dolor sit amet,^1 consectetuer adipiscing elit, sed diam nonummy^2 nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.^3

1 Ut wisi enim ad minim veniam.

2 Duis autem vel eum iriure dolor in hendrerit in vulputate.

3 Delenit augue duis dolore te feugait nulla facilisi.

We have a reference number for note 1 after "amet," but let's say we want to refer to note 1 again, this time after "elit," like this:

Lorem ipsum dolor sit amet,^1 consectetuer adipiscing elit,^1 sed diam nonummy^2 nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.^3

1 Ut wisi enim ad minim veniam.

2 Duis autem vel eum iriure dolor in hendrerit in vulputate.

3 Delenit augue duis dolore te feugait nulla facilisi.

Is that even possible in Word? Yes, it is, and it's called cross-referencing a note. The procedure is basically the same for footnotes or endnotes, although here I'll use footnotes for the example. Here's how to do it:

1. Open a document that has footnotes.

2. Put your cursor in your text where you want to cross-reference an existing note.

3. Click the "Insert" menu.

4. Click "Cross-reference."

5. Click the "Reference type" drop-down list.

6. Click "Footnote" in the list.

7. Click the "Insert reference to:" list.

8. Click "Footnote number (formatted)"--probably the last item in the list.

9. In the "For which footnote:" list, click the number of the footnote you want to cross-reference.

10. Click the "Insert" button.

These instructions sound more complicated than the procedure actually is--it's fairly easy. Be careful, though. If you insert a new note before your original note, the cross-referenced note won't change automatically. For example, here's our document with the cross-referenced note 1:

Lorem ipsum dolor sit amet,^1 consectetuer adipiscing elit,^1 sed diam nonummy^2 nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.^3

1 Ut wisi enim ad minim veniam.

2 Duis autem vel eum iriure dolor in hendrerit in vulputate.

3 Delenit augue duis dolore te feugait nulla facilisi.

Now, if we insert a new note after "ipsum," our original note 1 reference number will change to "2," but our cross-referenced note number after "elit" will remain as "1":

Lorem ipsum^1 dolor sit amet,^2 consectetuer adipiscing elit,^1 sed diam nonummy^3 nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.^4

1 Accumsan et iusto odio dignissim.

2 Ut wisi enim ad minim veniam.

3 Duis autem vel eum iriure dolor in hendrerit in vulputate.

4 Delenit augue duis dolore te feugait nulla facilisi.

Why? Because the cross-referenced note number is what Microsoft calls a "field," and fields don't update automatically. To update the field (the cross-referenced note number), select it and press the F9 key. The document will then look like this, with the number after "elit" updated to a "2":

Lorem ipsum^1 dolor sit amet,^2 consectetuer adipiscing elit,^2 sed diam nonummy^3 nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.^4

1 Accumsan et iusto odio dignissim.

2 Ut wisi enim ad minim veniam.

3 Duis autem vel eum iriure dolor in hendrerit in vulputate.

4 Delenit augue duis dolore te feugait nulla facilisi.

If you want to update all of the fields in your document (if you've got lots of cross-referenced note numbers, for example), select all (Edit > Select All) and then press F9. You can also set fields to update when you print by clicking Tools > Options > Print and putting a checkmark in the box labeled "Update fields."

Incidentally, these cross-referenced notes work beautifully with the "Notes to Text" feature of our NoteStripper program and, after being stripped, with our QuarkConverter program. You can learn more about these programs here:

http://www.editorium.com

_________________________________________

READERS WRITE

If you're creating custom VBA projects, you'll appreciate the following information from Wordmeister Steve Hudson, who wrote:

The "Disk Full on template save" error and "Network Lag on Document Open" error AND "Setting Digital Certificate" error.

Hah. Three problems in one. To cut to the chase, it's caused by a missing reference which can be located via the VBE (ALT+F11) > Tools > References dialog. Get rid of that reference by clearing the checkmark. If you had anything using that reference you need to relink it to its new destination.

A simple way to cause this is to not provide the original document template. This causes a missing reference to that template to appear in this list. It will try and hunt it down across your paths in the Tools > Options > File Locations dialog, thus causing shocking lag when some of these locations are network addresses.

It also causes problems when the VBA project is forced to recompile. The compile process fails as it cannot resolve the reference. VBA projects are forced to recompile when given a new digital signature or a new object is added.

Thanks to Steve for this important tip.

_________________________________________

RESOURCES

The Word-PC list and archives are, in my opinion, some of the finest Microsoft Word resources available anywhere. You can join the list or search the archives here:

http://listserv.liv.ac.uk/archives/word-pc.html

Shifting Styles, Part 4

You're typing along, and suddenly the short line you entered a couple of paragraphs earlier has turned big and bold. Who does it think it is, anyway? When you investigate, you discover that the line has somehow been formatted with Word's Heading 1 style.

You've just discovered one of the wonders of Word's AutoFormat feature, which should be firmly beaten into submission before it takes over your whole document. If you want to see how it works, try this:

1. Click the "Format" menu.

2. Click "AutoFormat."

3. Click the "Options" button.

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

5. Under "Apply as you type," put a check in the box labeled "Headings." If there's already a check there, you've found the source of your anguish.

6. Click the "OK" button.

7. Click the "Close" button.

Now, in a new document, do this:

1. Type "My Heading" (without the quotation marks), and be sure not to type any punctuation after it.

2. Hit the Enter key twice.

Wow, the text is now formatted with the Heading 1 style. You might think that's kind of neat, but what if you didn't *want* the text to be a heading? What if you were just typing a list of items without ending punctuation (which, by the way, seems to be the defining factor here)? Then you need to turn the feature off.

See, the whole issue is one of control. How much "help" do you want Microsoft Word to give you? If you're editing, your answer may be "none," because editors need to have complete control over what's happening, and they can't have Word introducing changes that they may not even be aware of. When I'm editing, I allow one AutoFormat option--replace "straight quotes" with "smart quotes" as I type--and I watch it like a hawk.

If you turn off the AutoFormat option to apply headings as you type, and you *still* get automatic formatting, you may still have the last "AutoFormat As You Type" option turned on. It's labeled "Define styles based on your formatting," and the Tooltip Help explains its function:

"Create new paragraph styles based on the manual formatting you apply in your documents. You can apply these styles in your document to save time and to give your documents a consistent 'look.'"

The idea that Word is creating new styles as I work just gives me the heebie-jeebies. This is one option I'm definitely going to keep turned off.

_________________________________________

READERS WRITE

On April 10, Editorium Update featured a macro to convert typed-in fractions (like 1/2) into typographically acceptable ones (like 1/2). You can read the article here:

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

In the article, I wrote, "I owe my thanks to Wordmeister Steve Hudson for the idea. Steve would probably take a more elegant approach, but this macro will definitely work." Well, by golly, Steve did create a beauty of a macro (the Fractionator) that even watches out for dates (4/10/2001, for example) and URLs and leaves them alone, while still creating beautiful fractions. Many thanks to Steve for this useful tool, and for his comments throughout the macro to explain what is going on.

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

You might also want to create a toolbar button for the macro, which you can learn about here:

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

And now, the macro:

'THE MACRO STARTS HERE
Private Const msgNoFraction As String = "No fractions found."
Private Const hitInfo As String = "Information"
Public Sub TextFormatAllFractions()
System.Cursor = wdCursorWait
If FractionFormatting = 0 Then MsgBox msgNoFraction, , hitInfo
System.Cursor = wdCursorNormal
End Sub
Public Function FractionFormatting(Optional Scope As Range) As Long
'returns the number of entries formatted
'formats 123/456 with super and subscript
'The Word Heretic
Const Search As String = "[0-9]@^47[0-9]@"
Dim Fractionator As String
Dim Divisor As Range
Dim Dividend As Range
Dim Slash As Range
Dim Finder As Range
Dim TestStart As Range
Dim TestEnd As Range
Dim IsFraction As Boolean
Dim StartChar As String
Dim EndChar As String
Const UrlText As String = "?%#_|$/"
If Scope Is Nothing Then Set Scope =
ActiveDocument.StoryRanges(wdMainTextStory)
Fractionator = ChrW$(8260) 'unicode
Set Finder = ActiveDocument.StoryRanges(wdMainTextStory)
Finder.Collapse
With Finder.Find
.Text = Search
'only search forwards
.Forward = True
.Wrap = wdFindStop
.MatchWildcards = True
While .Execute(replace:=wdReplaceNone)
FractionFormatting = True
Set Divisor = Finder.Duplicate
Set Dividend = Finder.Duplicate
'divisor is the bit at the end
'so move start until we find a slash
Divisor.MoveStartUntil cset:="/"
'then move just past it
Divisor.MoveStart unit:=wdCharacter, Count:=1
' now make sure we get the rest of the number
' (Word's Find wildcards feature sux)
Divisor.MoveEndWhile cset:="0123456789"
'dividend is the bit at the start
'so start from the beginning
Dividend.Collapse
'include everything up to the slash
Dividend.MoveEndUntil cset:="/"
'The slash is right after our dividend
Set Slash = Dividend.Duplicate
'so start at the end
Slash.Collapse wdCollapseEnd
'and move forward 1!
Slash.MoveEnd unit:=wdCharacter, Count:=1
'Now, test if it is a fraction or part of a bigger formula.
'First, get the chars immediately before and after
Set TestStart = Dividend.Duplicate
TestStart.Collapse
TestStart.MoveStart unit:=wdCharacter, Count:=-1
Set TestEnd = Divisor.Duplicate
TestEnd.Collapse Direction:=wdCollapseEnd
TestEnd.MoveEnd unit:=wdCharacter, Count:=1
StartChar = TestStart.Text
EndChar = TestEnd.Text
IsFraction = True 'innocent until proven guilty
'Check if this is a field. Its probably a hyperlink or similar
'So don't process it
If Slash.Fields.Count > 0 Then IsFraction = False
'Test for some obvious false positives
If (LCase$(EndChar) >= "a" And LCase$(EndChar) <= "z") Or _
(LCase$(StartChar) >= "a" And LCase$(StartChar) <= "z") Or _
InStr(1, UrlText & ".", StartChar) > 0 Or _
InStr(1, UrlText, EndChar) > 0 Then IsFraction = False
If IsFraction Then
'set the styles at LAST!
Dividend.Font.Superscript = True
Divisor.Font.Subscript = True
Slash.Text = Fractionator
FractionFormatting = FractionFormatting + 1
End If
'Now, set the find range so we find
'the next fraction
Finder.Collapse wdCollapseEnd
Wend
End With
End Function
'THE MACRO ENDS HERE

_________________________________________

RESOURCES

Speaking of Steve Hudson, Steve sent a bunch of his favorite resources, one of which is the Qwik and Dirty Task Guide for Microsoft Word:

http://www.oootraining.com/QwikAndDirty/QwikAndDirtyWordWeb/qwikword.htm

The Web site notes, "We'll show you how to do multi-step tasks in Microsoft Word by guiding you through the screen sequences. Scroll down, as needed. We use very few words, but realistic examples."

The site features clear, illustrated, step-by-step instructions for using various features of Microsoft Word, and a handy table of contents for easy navigation. Especially if you're just starting out with Word, you'll find this site invaluable.

Shifting Styles, Part 3

You're working away, editing a client's document, and decide to modify the Heading 1 style to use a Goudy typeface. Whoa! Now the Heading 2 and Heading 3 styles are in Goudy as well. What's going on here?

What's going on is that your client has made the Heading 2 and Heading 3 styles "based on" the Heading 1 style. If you don't know how this works, you'll be scratching your head over the changing formats. If you *do* know how it works, you can use it to ensure consistent formatting throughout a document.

Let's say you want all of your headings to be set in Baskerville. It's true that you could go through and set Heading 1, Heading 2, Heading 3, Heading 4, Heading 5, Heading 6, Heading 7, Heading 8, and Heading 9 (whew!) all to use that font (in varying point sizes, say). But now what if you want to switch to Palatino? Do you really have to go through and modify all of those styles again? Not if you originally based them all on Heading 1. If you did that, all you have to do is change the font for Heading 1, and all of your other heading styles will change as well. Pretty neat! Here's how to do it:

  1. Click the "Format" menu.
  2. Click "Style."
  3. In the Styles list, click the style (Heading 2, for example) that you want to base on another style (such as Heading 1).
  4. Click the "Modify" button.
  5. In the "Based on" dropdown list, click the style on which you want to base the current style.
  6. Click the "OK" button.
  7. Click the "Close" button.

Now, whenever you modify the "parent" style (Heading 1), the "child" style (Heading 2) will be modified automatically.

Please note, however, that any changes you make to the "child" style will override the attributes of the "parent" style. For example, if Heading 1 is set to 18 points, you can still modify Heading 2 (based on Heading 1) as 14 points. If you do that, though, you may wonder how to get rid of the override if you need to. Here's the secret: change the attribute in Heading 2 back to the way it's set in Heading 1 (14 points back to 18 points). The "child" style will simply pick up its attributes from the "parent style" once again.

This "based on" feature is extremely useful. You can use it to set up whole families of styles that are based on a "parent" style. For example, you might want to set up a family of heading styles, a family of body text styles, and a family of list styles, and then store them all in a special template. Just be sure to use a naming convention that makes it easy to remember which styles are the "parents." The easiest way to do this may be to use "1" to designate "parent" styles: Heading 1, Body Text 1, List 1, and so on. Then you can use other numbers (2, 3, 4) to indicate "child" styles.

Now, when your styles start shifting, you'll be happy rather than sad.

READERS WRITE

Last week's newsletter discussed Word's "Automatically update" feature for styles. In the newsletter, I suggested turning on the feature while designing a document but turning off the feature while writing or editing. If you've got lots of styles, however, this can get pretty tedious. Gary Frieder, a Microsoft Word MVP at Woody's Lounge (http://www.wopr.com) created a macro to turn off updating for all styles, and Bill Rubidge edited the macro to turn on updating. Thanks to Bill for sending the macros, and thanks to Gary for giving permission to use them. Enjoy!

'MACRO THAT CRAWLS ALL THE STYLES AND TURNS AUTO-UPDATE ON
Public Sub TurnOnAutomaticallyUpdate()
' TurnOnAutomaticallyUpdate Macro
' Created by Gary Frieder, edited by Bill Rubidge to turn on, not off
Dim aSty As Style
For Each aSty In ActiveDocument.Styles
   If aSty.Type = wdStyleTypeParagraph Then
   aSty.AutomaticallyUpdate = True
   End If
Next aSty
End Sub
 'MACRO THAT CRAWLS ALL THE STYLES AND TURNS AUTO-UPDATE OFF
Public Sub RemoveAutomaticallyUpdate()
' RemoveAutomaticallyUpdate Macro
' Created by Gary Frieder
Dim aSty As Style
For Each aSty In ActiveDocument.Styles
   If aSty.Type = wdStyleTypeParagraph Then
   aSty.AutomaticallyUpdate = False
   End If
Next aSty
End Sub

RESOURCES

Microsoft Product Support Services is actually one of my favorite places to find information about using Microsoft Word:

http://support.microsoft.com/

I just use the dropdown list on the left to select the version of Word I want to learn about (Word 2000, for example). Then I type some key words in the box just below that ("modify styles," for example), and click "Search now." The site has a lot of information, although you may have to dig to find just what you need.

Shifting Styles, Part 2

Here's the scenario: You've just opened a new document from a client, and you italicize the first paragraph, which is a short quotation introducing the chapter. But suddenly *all* of the chapter text is italicized. What in the world is going on?

You've just bumped into Word's "Automatically update" feature for styles. (This is different from the "Automatically update document styles" feature discussed in last week's newsletter.) If you don't know about the "Automatically update" feature, you can spend hours trying to adjust formatting, only to have everything in sight messed up beyond belief.

To turn the feature off, do this:

1. Click the "Format" menu.

2. Click "Style" (in Word 2002, that's "Styles and Formatting").

3. Click the style that's giving you fits (such as Heading 1). (In Word 2002, click the drop-down arrow to the right of the style in the Task Pane.)

4. Click "Modify."

5. Remove the checkmark from the box labeled "Automatically update."

6. Click the "OK" button.

7. If necessary, click the "Close" button.

Now, when you modify some formatting in your document, you'll change only the local selection and not everything that's formatted in the same style. But really, you should avoid using directly applied formatting anyway. Using paragraph and character styles is much more efficient--the True Way--and avoids a multitude of problems.

So what's the point of the "Automatically update" feature? It allows you to modify styles without drilling down, down, down through the Styles dialog. Well hey, that's good! It means you can change formatting directly, see the result immediately, and have the styles updated automatically to reflect that formatting. Pretty neat!

So here's my recommendation:

1. If you're *designing* a document, use the "Automatically update" feature with a bunch of junk text to set your styles exactly the way you want them (be sure to select the whole paragraph before changing the format). Once you've got them set, turn off "Automatically update." Then copy the styles to your real document, or save the junk document as a template that you attach to your real document. You can learn more about this here:

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

2. If you're *writing* or *editing* a document, make sure the "Automatically update" feature is turned off. You'll have a happier day.

_________________________________________

READERS WRITE

Rhana Pike (Rhana@ctc.usyd.edu.au) wrote:

"I was interested to read the tip on automatic updating of styles. A related issue is the box that appears sometimes when I try to apply a style to a paragraph: it says something like 'Update the style to match selection?' (I can't get it to appear now). Is there a way of getting rid of this or applying a default, because I set styles through the menu and never want to update the style to match the selection."

Here's how this works: When you apply direct formatting to a paragraph (such as formatting it in bold with CTRL + B), and then immediately click the paragraph style (such as Heading 1) in the Styles list on the Formatting toolbar, Word asks if you want to:

1. Update the style to reflect recent changes, or

2. Reapply the formatting of the style to the selection.

If you click option 1, Word will modify the style to match the manual formatting you've applied to the paragraph. This is a quick way to modify styles--similar to the technique explained in the main article in today's newsletter.

If you click option 2, Word will override all of that lovely manual formatting you've just done and reapply the existing formatting of the style.

Is there a way to get rid of these options and just apply the style? The only way I know of is not to click the Styles list after applying formatting directly--or, better yet, to avoid using directly applied formatting altogether.

Thanks to Rhana for her question.

_________________________________________

RESOURCES

Mark Pool (mark913@earthlink.net) wrote:

I really like the Google toolbar. It's a free download at

http://toolbar.google.com/

It occupies no more space than the address bar. Whenever I'm online and want to do a search it's always handy. Some of the advanced features are pretty cool, too, such as "Highlight".

Thanks to Mark for this helpful hint.

Shifting Styles

Scene 1: You go through your document, fine-tuning its style formatting to the peak of perfection. Then you carefully save your document for posterity.

Scene 2: A week later, you open your document. What the . . . ? All of your styles have shifted back to their original formatting. You'll have to do all of that work over again! And how can you be sure it will stick?

Here's the secret:

1. Open the document.

2. Click "Tools > Templates and Add-Ins."

3. *Remove* that dadburned checkmark in the box labeled "Automatically update document styles."

4. Resave your document.

The next time you open the document, your exquisite style formatting will remain intact.

So what's the point of the "Automatically update document styles" feature? Well, let's say that your boss just loves to tinker with the look of your company's forms and stationery, mandating Helvetica one week and Comic Sans the next. If you turn on "Automatically update document styles" for every company document you create, changing the formatting is a snap. Just open the template on which the documents are based, modify the styles, and resave the template. The next time you open one of those documents, its styles will automatically update to match those of the template.

It's a slick feature, as long as you know when--and when not--to use it. And now you do!

_________________________________________

READERS WRITE

After reading about the fraction macro in last week's newsletter, Bill Rubidge (william.rubidge.es.80@aya.yale.edu) wrote:

The fraction macro is an excellent start, but I suspect many of your readers would need to add an additional search process at the beginning of the macro, to search for dates formatted with slashes and mark those so that they do not get converted to these fancy fractions.

Without much thought, I would imagine you would need to run a wildcard search for:

([0-9]{1,2})/([0-9]{1,2})/([0-9]{1,4}) (Note that the last item, the year, has space for up to four digits, being used a lot lately as we turn centuries.)

I would then (probably crudely) replace with 1DATESLASH2DATESLASH3DATESLASH

Then run the macro you provide, but add a final replace at the end to replace DATESLASH with / to get back my XX/XX/XX dates.

It's worth reminding readers that the most challenging part of writing any of these search and replace macros is making sure that you write your search criteria and/or mark out items that might otherwise be unintentionally replaced.

Many thanks to Bill for this important caveat.

_________________________________________

RESOURCES

If you don't subscribe to Woody's Office Watch, a free email newsletter from Woody Leonhard, the Grand Poobah of Microsoft Office, you're missing out on advice, tips, and news that no Office user should be without:

http://www.woodyswatch.com

Why not sign up today? While you're there, check out Woody's books and software. You might find just what you need to make your life easier and more productive.

Fraction Macro

Last week's newsletter explained how to make your own typographical fractions in Microsoft Word. You can read about the technique here:

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

But if your document is full of plain-text fractions, like these--

1/3 2/3 5/8

--why not let a macro do the work? I owe my thanks to Wordmeister Steve Hudson for the idea. Steve would probably take a more elegant approach, but this macro will definitely work. Enjoy! If you don't know how to use macros like this one, you can learn how here.

And now, the macro:

'THE MACRO STARTS HERE
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([0-9]@)/([0-9]@)"
.Replacement.Text = "|sp|1|sp|" + ChrW(8260) + "|sb|2|sb|"
.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.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Superscript = True
.Subscript = False
End With
With Selection.Find
.Text = "|sp|([0-9]@)|sp|"
.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.Replacement.Font
.Superscript = False
.Subscript = True
End With
With Selection.Find
.Text = "|sb|([0-9]@)|sb|"
.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
'THE MACRO ENDS HERE

What's basically going on here is that Word uses a wildcard search to find all numbers that have a slash between them:

Find What: ([0-9]@)/([0-9]@)

Then it replaces those numbers with *themselves* surrounded by arbitrary codes denoting superscript (|sp|) and subscript (|sb|). It also replaces the slashes with the fraction bar character, Unicode number 8260:

Replace With: "|sp|1|sp|" + ChrW(8260) + "|sb|2|sb|"

(If you were doing this by hand, you could insert the fraction bar into your document using Insert > Symbol [as explained in last week's newsletter], then copying it, and then pasting it into the Replace dialog's "Replace With" box. The result would look something like this: |sp|1|sp|/|sb|2|sb|)

Finally, the macro uses parentheses to group the numbers so that after they and their surrounding codes are found, the numbers can be replaced by *themselves,* properly formatted and without the codes, using the "Find What Expression" wildcard:

Find What: |sp|([0-9]@)|sp|

Replace With: 1 [formatted as superscript]

Find What: |sb|([0-9]@)|sb|

Replace With: 1 [formatted as subscript]

You can learn more about wildcard searches here:

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

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

_________________________________________

READERS WRITE

Gentle reader, I've run into a fairly serious problem that I'm hoping you may have some ideas about. The problem is that QuarkXPress doesn't import Unicode characters--the old 256 are all it will deal with. Several people have asked me if there's a way to find and replace Unicode characters in Word with other lower-level characters that Quark could deal with. For example, if you type a, b, c in Quark and then format it with a Greek font, you get alpha, beta, gamma. Maybe a similar approach could be taken with Unicode characters, if you could figure out what to replace them with in Word (and actually do the replacing) before importing the Word document into Quark. I don't know--this looks like an almost insurmountable problem to me. If you are successfully importing Unicode characters into QuarkXPress, especially using XPress Tag files, I'd love to hear from you. Please write to me here: mailto:editor [at symbol] editorium.com

Sage Rountree (srountree@dukeupress.edu) wrote:

"When we insert notes to compositor and authors in electronic manuscript files, we want those inserts to be bold and in either angle brackets (for coding and notes to compositor) or curly brackets (for queries to authors). Sometimes, our freelance copyeditors neglect to toggle on the bold for these queries, and we go through and manually convert them to boldface. (By manually, I mean we search for the opening bracket, highlight, and toggle--a big waste of time.)

"I'm able to figure the search-and-replace for toggling short coding with fixed letters (, ) to boldface, but how can I replace all text between the brackets <> and {} *with the brackets themselves* and the text they contain in bold? The substance of the note can sometimes be a few sentences long, and I don't know how to denote that with wildcards. It's like the opposite of the process you outlined in the 10/25/2000 newsletter on replacing with "find what text."

"This has been an interesting mental puzzle for me, but I'm ready to throw in the towel.

Minutes later, before I could respond, Sage wrote again:

"Jack, I spoke too soon about throwing in the towel, and I added the backslash so Word would recognize the angle brackets as characters, not as the start and end of words. To that end, I wrote this macro:

Selection.HomeKey Unit:=wdStory

Selection.Find.ClearFormatting

Selection.Find.Replacement.ClearFormatting

Selection.Find.Replacement.Font.Bold = True

With Selection.Find

.Text = "<*>"

.Replacement.Text = "^&"

.Forward = True

.Wrap = wdFindContinue

.Format = True

.MatchCase = False

.MatchWholeWord = False

.MatchWildcards = True

.MatchSoundsLike = False

.MatchAllWordForms = False

End With

Selection.Find.Execute Replace:=wdReplaceAll

Many thanks to Sage for this useful macro (which I edited slightly). I'd add that if your comments are between curly brackets, you could replace the sixth line with this:

.Text = "{*}"

_________________________________________

RESOURCES

So, you kind of like all this programming stuff, eh? Want to learn more? There's an excellent tutorial, "Getting to Grips with VBA Basics in 15 Minutes," by Word expert Bill Coan, at the MVPS Web site. You'll find the tutorial here:

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

Fractions

Using fractions has always been a challenge in Microsoft Word. A few (1/2, 1/4, and 3/4) have been readily available. But what about 1/3, 2/3, and other common ones?

Microsoft recommends creating additional fractions by using equation fields or the Equation Editor. You can learn more about these methods here:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q137734

Unfortunately, these methods are inadequate, for a couple of reasons:

1. They're ugly. The fractions they create are typographically unacceptable.

2. They're clunky. Using them is a chore, and they create fields or graphics, not actual text.

Fortunately, better methods are available.

ROLL YOUR OWN

The "roll your own" method consists of creating a fraction by hand, using a superscript number, a fraction bar, and a subscript number. Here's how it works:

1. Type the top number of your fraction (the dividend, if you're mathematically inclined).

2. Insert a fraction bar (which is different from [more slanted than] the virgule, diagonal, solidus, slash, or whatever you want to call that character below the question mark on your keyboard). To do this:

a. Click Insert > Symbol.

b. Click the Font list

c. Select "Symbol."

d. Find the number 4 on the top row and count down five squares. See the fraction bar? (ANSI 164.)

e. Click the square containing the fraction bar.

f. Click the "Insert" button.

g. Click the "Close" button.

3. Type the bottom number of your fraction (the divisor). Your fraction should now look like this: 2/3.

4. Select the top number and format it as superscript (Format > Font > Superscript).

5. Select the bottom number and format it as subscript (Format > Font > Subscript).

That's it! Not a bad-looking fraction, if you ask me. And once it exists, you can turn it into an Autocorrect or Autotext entry so you don't have to create it from scratch the next time you want to use it.

UNICODE

Unicode fonts include *lots* of characters, including quite a few fractions. So why not use them? You can learn more about Unicode characters here:

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

Here's the easiest way to insert Unicode fractions (if your fonts, operating system, and version of Word support it):

1. Click the Insert menu.

2. Click "Symbol."

3. In the Font list, select a Unicode font, which will display the Subsets list to the right of the Font list and have lots of subsets available (such as Latin-1, Spacing Modifier Letters, and so on).

4. In the Subset list, select "Number Forms."

5. Somewhere in the characters displayed, you should see some fractions. Click the one you want to use.

6. Click the "Insert" button.

7. Click the "Close" button.

There's your fraction. Again, you can turn it into an Autocorrect or Autotext entry for easy access.

If you like entering Unicode characters directly (using ALT + X in Word 2002), here are the Unicode numbers you'll need:

1/3: 2153

2/3: 2154

1/5: 2155

2/5: 2156

3/5: 2157

4/5: 2158

1/6: 2159

5/6: 215A

1/8: 215B

3/8: 215C

5/8: 215D

7/8: 215E

Thanks to Maggie Brown for suggesting this topic.

_________________________________________

READERS WRITE

Jeffrey White wrote:

I am an attorney who writes appellate briefs. That often involves cutting and pasting from other sources. I need to make sure that case names appear in italic. For instance, General Motors Corp. v. Ford Motor Co., 123 F.2d 456 (1990).

It occurs to me that I could use search-replace. Using your discussion of wildcard searching, I have tried to construct a command that will find the most common pattern: One or more words beginning with an initial capital letter, followed by "v. ", followed by one or more capitalized words, ending with a comma.

I have been able get one capitalized word, followed by "v. " Is there any way to ask Word 2000 to find a string of one or more capitalized words?

I responded:

The following string will find three capped words in a row (including any periods, commas, and spaces):

([A-Z][a-z.,]@ [A-Z][a-z.,]@ [A-Z][a-z.,]@ )

However, when you put in the "v. " and then *repeat* the string, like this--

([A-Z][a-z.,]@ [A-Z][a-z.,]@ [A-Z][a-z.,]@ )v. ([A-Z][a-z.,]@ [A-Z][a-z.,]@ [A-Z][a-z.,]@ )

--Word will tell you that the string is "too complex." (Theoretically what you want to do should be possible, but in practice it's not. MS Word just ain't that smart, unfortunately.) I haven't been able to get variations to work either. For example, you'd think that you could use this string to find from 1 to 4 occurrences of a capped word followed by a space:

([A-Z][a-z]@ ){1,4}

But no--at least not in Word 2000. And this *should* work. The wildcard search and replace definitely has some minor bugs, especially with complex searches. I've also tried using the "start of word" and "end of word" wildcards (<, >) without success.

There is a workaround you may be able to use, however:

1. Identify all of the names used in the case names in your document (General Motors Corp., Ford Motor Co., etc.).

2. Find and Replace them with uppercase abbreviations (GMC, FMC, etc.).

3. Use a wildcard Find and Replace to italicize the abbreviations. To do so, put this (possibly with some tweaking to fit your situation) in the "Find What" box:

(<[A-Z]{2,}>) v. (<[A-Z]{2,}>)

Put this (possibly with some tweaking) in the "Replace With" box:

1 v. 2

Format the "Replace With" box as italic (CTRL + I).

4. Click the "Replace All" button.

5. Find the abbreviations and Replace them with the actual names.

Jeffrey then responded:

Building on your suggestion, the following will select the one capitalized word preceding the v. , along with the rest of the case name.

[A-Z][a-z]@ v. [A-Z]*,

That probably does the job for 90% of my case names. If I replace one at a time, instead of Replace All, I can keep an eye out for preceding words that also need italics. That's still a time savings over a wholly manual edit. Or I can make a second pass, repeating the initial string to find case names beginning with 2 words:

[A-Z][a-z]@ [A-Z][a-z]@ v. [A-Z]*,

And then 3, and so on. It's hard to know when to stop, because some case names are quite lengthy.

Slowly but surely, many law offices have moved from WordPerfect to Word. Those of us who appreciate the value of working smarter appreciate your newsletter and tools.

Thanks to Jeffrey for sending this interesting challenge. To learn more about wildcard searching, see these back issues of

Editorium Update:

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

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

_________________________________________

RESOURCES

Webopedia bills itself as "the only online dictionary and search engine you need for computer and Internet technology." If you're doing technical editing, you'll probably find it useful:

http://www.webopedia.com

Copying and Pasting Styles

If you frequently use styles (which you should) to format your documents or specify text levels for typesetting, you're probably aware that you can press CTRL + SHIFT + S to activate the style list. (Then you can scroll through the list to get the style you need.)

You may not be aware, however, that you can easily copy and paste styles (both paragraph and character styles), just as you can copy and paste text. If you've never done this before, it will make you smile. Here's the procedure:

1. Put your cursor on some text formatted with the style you want to copy (Heading 1, for example).

2. Press CTRL + SHIFT + C (just like the keyboard shortcut for copying text, but with the SHIFT key added).

3. Move your cursor to (or select) the text you want to format with the style you just copied.

4. Press CTRL + SHIFT + V (just like the keyboard shortcut for pasting text, but with the SHIFT key added).

The text will be formatted with the style you copied.

_________________________________________

READERS WRITE

Jeff Ross sent the following macro to clean up text copied into Word from an email message. Thanks, Jeff!


Sub CleanMyMessage()
' CleanMyMessage Macro
' Macro recorded 3/11/02 by Jeff Ross
'Remove angle brackets with spaces
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
'Remove other angle brackets
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
'Remove spaces before paragraph breaks
With Selection.Find
.Text = " ^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Mark true paragraph breaks with unique character
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p^p"
.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
'Replace other (false) paragraph breaks with spaces
With Selection.Find
.Text = "^p"
.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
'Replace unique character with paragraph break
With Selection.Find
.Text = "?"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
'Turn double hyphens to em dashes
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
'Turn straight single quotation marks into curly ones
'Note: For this to work, the AutoFormat option
'to replace straight quotes with curly quotes must be on
'(Click Tools > AutoCorrect > AutoFormat As You Type >
'Replace as you type > straight quotes with smart quotes)
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
'Turn straight double quotation marks into curly ones
'Note: For this to work, the AutoFormat option
'to replace straight quotes with curly quotes must be on
'(Click Tools > AutoCorrect > AutoFormat As You Type >
'Replace as you type > straight quotes with smart quotes)
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

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

_________________________________________

RESOURCES

Dan A. Wilson, expert online editor and proprietor of The Editor's Desktop, provides several useful resources for editors, including:

* a basic FTP tutorial (if you need to transmit electronic manuscripts to clients)

* suggestions for choosing anti-virus software

* a discussion of freelancers' rates

* a recommended list of reference works (printed and electronic) for editors

* a low-tech guide to Wintel computer maintenance

* information about installing a firewall on your computer

You can read Dan's articles here:

http://www.editorsdesktop.com/articles.html

And you can check out his editing services here:

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

Repeating Macros

If you record macros to help automate your editing, you've probably bumped into a seemingly insurmountable problem: You can get a macro to find something, and then do something, but not more than once. For example, let's say you want a macro to do this:

1. Find text formatted with the Heading 1 paragraph style.

2. Move to the next paragraph.

3. Insert these characters: "Tip. "

4. Repeat steps 1 through 3 until there aren't any more Heading 1 paragraphs to find.

You can get a macro to do steps 1 through 3, just by recording those steps. But how do you get it to do step 4 (other than running the macro 587 times)?

Well, you can't just record that part. You have to go *into* the macro and insert the commands that will make it repeat. Here's how to proceed:

IN WORD 97 AND ABOVE

1. Record the steps you want your macro to take (find something, then do something). You can learn more about recording macros here:

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

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

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

2. After you've stopped the macro recorder, click "Tools > Macro > Macros."

3. Click the macro you just recorded (you may need to scroll down the list to find it).

4. Click "Edit." The macro editor will open on your screen, showing the commands you've recorded. For example, if you recorded steps 1 through 3, above (way above: "1. Find text formatted with the Heading 1 paragraph style," and so on), here are the commands you'd see:

Selection.Find.ClearFormatting

Selection.Find.Style = ActiveDocument.Styles("Heading 1")

With Selection.Find

.Text = ""

.Replacement.Text = ""

.Forward = True

.Wrap = wdFindContinue

.Format = True

.MatchCase = False

.MatchWholeWord = False

.MatchWildcards = False

.MatchSoundsLike = False

.MatchAllWordForms = False

End With

Selection.Find.Execute

Selection.MoveDown Unit:=wdParagraph, Count:=1

Selection.TypeText Text:="Tip. "

(Note: If your version of Microsoft Word inserts the following command as the third line in the macro--"Selection.Find.ParagraphFormat.Borders.Shadow = False"--take it out. As far as I can tell, this comes from a bug in Microsoft Word, and you don't want it in there.)

You can probably tell by reading these commands what they do. All but the last three set up the parameters for your search. The third command from the bottom executes the search. All of this constitutes the "find something" part of the macro.

The last two commands constitute the "do something" part. In this example, they move down one paragraph and type in the string of characters. Our challenge, of course, is to get these commands to repeat--and then get the Find command to repeat. And to keep repeating everything until there's nothing left to find.

So here's the secret: Just before the "do something" part of the macro, insert the following command:

Do While Selection.Find.Found

That tells Word to keep doing the "do something" part as long as ("While") Word finds the "find something" part.

Of course, you also want Word to keep doing the "find something" part, too. So, you have to include the following command at the end of the "do something" part:

Selection.Find.Execute

That tells Word to execute the Find command again--as long as something continues to be found.

Finally, to tell Word where to *stop* repeating, you have to insert this command:

Loop

When you're finished, the whole thing will look like this (except that I've added an X to show you each command we've added):

Selection.Find.ClearFormatting

Selection.Find.Style = ActiveDocument.Styles("Heading 1")

With Selection.Find

.Text = ""

.Replacement.Text = ""

.Forward = True

.Wrap = wdFindContinue

.Format = True

.MatchCase = False

.MatchWholeWord = False

.MatchWildcards = False

.MatchSoundsLike = False

.MatchAllWordForms = False

End With

Selection.Find.Execute

X Do While Selection.Find.Found

Selection.MoveDown Unit:=wdParagraph, Count:=1

Selection.TypeText Text:="Tip. "

X Selection.Find.Execute

X Loop

That's it. Click "File > Close and Return to Microsoft Word."

Now, when you run the macro, it will *keep* running until it's finished all of the paragraphs you specified.

IN WORD 6 AND 95

Here's the macro as it appears in Word 6 and 95, with an X marking each line I've added to the recorded macro:

EditFindStyle .Style = "Heading 1"

EditFind .Find = "", .Direction = 0, .MatchCase = 0, .WholeWord = 0, .PatternMatch = 0, .SoundsLike = 0, .Format = 1, .Wrap = 1, .FindAllWordForms = 0

X While EditFindFound()

ParaDown 1

Insert "Tip. "

X EditFind

X Wend

_________________________________________

RESOURCES

Jean Hollis Weber has done it again, with her new book, Taming Microsoft Word 2000. Subtitled "Hot tips and cool tricks for business and technical documents," this 120-page compendium of basic but useful knowledge will help you become an instant expert on:

* Setting up Word 2000 to work your way

* Editing and reviewing documents

* Controlling page layout

* Using templates and styles effectively

* Getting the most from fields

* Working with large or complex documents

* Working with graphics

* Creating Web pages and PDF documents from Word

I'm especially impressed with the book's crystal-clear explanations, annotated screen shots, and elegant formatting. If you've been looking for a systematic treatment on mastering Microsoft Word, look no further. You can download a copy of the book here:

http://www.jeanweber.com/books/tameword.htm

Jean's previous book on taming Microsoft Word (for Word 6, 95, and 97) is also available:

http://www.jeanweber.com/books/tamewd97.htm

If you like either of these books, please be sure to compensate Jean for her efforts. You'll find payment instructions here:

http://www.jeanweber.com/bookshop/payme.htm