Word's Style Area

If you use styles to format text in Microsoft Word (which you should), the style of the currently selected paragraph is displayed in the Style dropdown list on the Formatting toolbar. To see what style is applied to a paragraph, you can click the paragraph and look at the list on the toolbar.

Wouldn't it be nice, though, if you could see all of the styles applied to all of the paragraphs on your screen all at the same time? Well, you can. You just have to display Word's Style Area. Here's how:

1. Open a document that contains a bunch of styled text.

2. Make sure your document is displayed in Normal view (click View > Normal). The Style Area isn't accessible in Print Layout (Page) view (but it is in Outline view).

3. Click the "Tools" menu.

4. Click "Options."

5. Click the "View" tab.

6. In the box labeled "Style area width," enter 1 inch or the equivalent.

7. Click the "OK" button.

Now, on the left side of your screen, you'll see the Style Area. In the Style Area, to the left of the first line of each paragraph, you'll see the name of the paragraph's style. Pretty slick!

You can change the size of the Style Area under Tools > Options > View, or simply by using your mouse to move the vertical line between the Style Area and the body of your document. If you've got lots of long style names, make it bigger.

Need to modify one of the styles listed in the Style Area? Just double-click it to open the Style dialog.

_________________________________________

READERS WRITE

Martha Kohl (mkohl@state.mt.us) wrote:

"I've encountered a weird problem. The author put notes in his manuscripts using Word's automatic note numbering system. So far, so good. However, in this particular book, we won't be using notes. I have tried deleting the notes as I came across them in the text, but while the note numbers disappear in the text, the notes are still there. I can't get rid of them. Any suggestions?"

I replied:

"I suspect that the author has revision tracking turned on, right? If so, there's a bug in Word that keeps deleted notes from actually going away. The only way around this is to make the tracked revisions permanent. Then the struck-out notes will disappear."

Thanks to Martha for her question.

_________________________________________

RESOURCES

LaShay Canady wrote:

Here are resources I use as a Virtual Assistant.

http://www.freetranslation.com/

helps to translate a website, phrase, or word into a different

language

http://www.timeanddate.com/worldclock/

helps to tell time for various clients in various time zones

http://www.mailwasher.net/download.php

An excellent anti-spam tool that is FREE!

Please note that MailWasher isn't available for Macintosh. If you're a Mac user and know of a similar program for Macintosh, please let us know.

Thanks to LaShay for the helpful tips.

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.