Jack Lyon

Microsoft Word 2007

Here it is, 2007 already. So it seems appropriate to look at Word 2007 and see if it's something editors and other publishing professionals might find useful. You'll find Microsoft's sales pitch here:

http://office.microsoft.com/en-us/word/FX100487981033.aspx

You should know ahead of time that I'm jaded, biased, and curmudgeonly when it comes to Microsoft's upgrades to Word. My favorite version is still Word 95, and my next favorite is Word 2000. Word 2003 is acceptable.

And 2007? Here's a list of of what Microsoft considers the "top benefits":

http://office.microsoft.com/en-us/word/HA101650321033.aspx

Word 2007's big new feature is the navigation "ribbon," which actually is pretty handy and doesn't make you guess about what the features might be or which ones are available.

My big gripe with the navigation ribbon is that Microsoft has made it so difficult to customize:

http://msdn2.microsoft.com/en-us/library/ms406046.aspx

And customization is really important for editors, indexers, typesetters, and other power users. Out of the box, Word is and always has been configured for the needs of the most basic users--people who need to write a letter, for example. That hasn't mattered much because Microsoft has made it so easy to customize. Users have been able to create their own menus and toolbars and set Word up to work exactly the way they need.

Not anymore.

With the navigation ribbon, all customization (unless you're a serious programmer) is limited to the Quick Access Toolbar above the ribbon. Customizations from existing add-ins are relegated to the "Add-ins" area of the ribbon and won't apply elsewhere. What in the world was Microsoft thinking?

What I *think* they were thinking is what they always seem to be thinking: "How can we dumb down this program even further?" No? Then explain to me the existence of the universally hated "Clippy," the Office Assistant. And why is a dog animation built into the Windows Search program? Why does a feature like "Automatically create styles based on my formatting" even exist?

The other thing they always seem to be thinking is: "How can we make customization harder for the average user?" Why do I say this? Consider the interface for Word 95. Menus were menus; toolbars were toolbars. Customizing either one was a cinch. Then came Word 97, in which menus and toolbars were different but really kind of the same, and much more confusing to customize. Then came Word XP, with that #@*$! Task Pane--which couldn't be customized at all. And now comes Word 2007 with its set-in-stone navigation ribbon.

Now consider the programming language for Word 95: WordBasic--which ordinary mortals (with a little study) could understand and use. Commands were simple. For example, the command to toggle bold formatting was this:

Bold

Then came Word 97, whose macro language was Visual Basic for Applications. Commands were complex. For example, the command to toggle bold formatting was this:

Selection.Font.Bold = wdToggle

Yes, it's more powerful. Yes, it's more consistent. No, it's not easier to use, and it made macro programming impossible for most people.

This combination of making the interface more and more generic and customization more and more difficult has, in my opinion, finally resulted in a version of Word (2007) that is unfit for any but two sets of users: the most basic, and the most advanced (programmers).

Am I wrong? Responsible comments to the contrary are welcome. Please send them here:

mailto:editor [at symbol] editorium.com

And now for a few comments on some of Word's new "benefits," as listed on Microsoft's website:

---------------------------------------

Spend more time writing and less time formatting.

A new, results-oriented interface presents the right tools when you need them, making it easy to format your documents quickly. Now you can find the right features in Office Word 2007 to make your documents communicate more effectively. Using Quick Styles and Document Themes, you can quickly change the appearance of text, tables, and graphics throughout the entire document to match your preferred style or color scheme.

---------------------------------------

This actually is a pretty neat feature for people setting type in Word, but it's more sizzle than steak, in my opinion.

---------------------------------------

Quickly assemble documents using Building Blocks.

Building Blocks in Office Word 2007 can be used to assemble documents from frequently used or predefined content such as disclaimer text, pull quotes, sidebars, cover pages, and other types of content. This will help ensure you don't spend needless time recreating content or copying and pasting between documents; it also helps ensure consistency across all of the documents created within your organization.

---------------------------------------

This could be useful for some editors.

---------------------------------------

Save as PDF or XPS directly from Office Word 2007.

Office Word 2007 offers you a choice for sharing documents with other people. You can convert your Word documents to Portable Document Format (PDF) or XML Paper Specification (XPS) format without the addition of third-party tools to help ensure broad communication with users on any platform.

---------------------------------------

Great!

---------------------------------------

Master your document review processes using Office Word 2007 and Microsoft Office SharePoint Server 2007.

With built-in workflow services in Office SharePoint Server 2007, you can initiate and track document review and approval processes from within Office Word 2007 to help accelerate review cycles across your organization without forcing people to learn new tools.

---------------------------------------

This could be very useful in a publishing office that actually uses SharePoint Server.

---------------------------------------

Remove tracked changes, comments, and hidden text from your documents.

Detect and remove unwanted comments, hidden text, or personally identifiable information using the Document Inspector to help ensure that sensitive information doesn't escape when your documents are published.

---------------------------------------

This is a much-needed fix; I wouldn't call it a new feature.

---------------------------------------

Use the tri-pane review panel to compare and combine documents.

Office Word 2007 makes it easy to find out what changes were made to a document. A new tri-pane review panel helps you see both versions of a document with deleted, inserted, and moved text clearly marked.

---------------------------------------

Now we're talking! Editors should find this very useful.

---------------------------------------

Reduce your file sizes and improve corrupt file recovery.

The new Ecma Office Open XML Formats offer a dramatic reduction in file size as well as improvement in recovery for damaged files. These new formats provide a tremendous savings to storage and bandwidth requirements, and reduce the burden on IT personnel.

---------------------------------------

There shouldn't *be* file corruption in the first place.

One final thought. Microsoft notes, "In our experience, every custom solution continues to work in the 2007 Office system."

That includes the programs I offer at the Editorium. In spite of my snide comments in this article, I'm extremely grateful to Microsoft for making this so, and to Wordmeister (and Word MVP) Steve Hudson for holding their feet to the fire.

Converting Text Boxes to Text

I've recently needed to help several people convert Microsoft Word text boxes to text. Is there something in the wind? Whatever is going on, if you're having to copy and paste, copy and paste, to get that text out where you can use it, you'll appreciate the following macro, which pulls text-box text out as regular text and styles it with a character style named "OnceABox," colored red for easy identification. To (eventually) get rid of the red, just delete the character style. (Thanks to Geoff Hart, David Chinell, and Janna DeVore for inspiration.)

If you don't know how to use such macros, you'll find instructions here:

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

If you have lots of documents that need to be converted, you might consider running the macro with my MultiMacro program:

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

And now, the macro. Enjoy!

'THE MACRO STARTS HERE
Sub ExtractTextBoxes()
Dim NoStyle As Boolean
Dim aStyle As Style
Dim aShape As Shape
Dim i As Integer
'Check for "OnceABox" character style
NoStyle = True
For Each aStyle In ActiveDocument.Styles
If aStyle.NameLocal = "OnceABox" Then
NoStyle = False
Exit For
End If
Next aStyle
'If necessary, create "OnceABox"
'character style
If NoStyle Then
ActiveDocument.Styles.Add Name:="OnceABox", _
Type:=wdStyleTypeCharacter
With ActiveDocument.Styles("OnceABox").Font
.Color = wdColorRed
End With
End If
'Style textboxes and convert to frames
For Each aShape In ActiveDocument.Shapes
If aShape.Type = msoTextBox Then
i = i + 1
aShape.Select
aShape.ConvertToFrame
Selection.Style = _
ActiveDocument.Styles("OnceABox")
End If
Next
'Clean and delete frames
For i = ActiveDocument.Frames.Count _
To 1 Step -1
With ActiveDocument.Frames(i)
.Borders.Enable = False
With .Shading
.Texture = wdTextureNone
.ForegroundPatternColor = _
wdColorAutomatic
.BackgroundPatternColor = _
wdColorAutomatic
End With
.Delete
End With
Next
End Sub
'THE MACRO ENDS HERE

_________________________________________

READERS WRITE

Following up on my February 9 article on Microsoft's seeming inconsistency regarding tracked changes, Ed Nelson sent this interesting comment:

We must accept the changes, but reject the inserts to get equivalent results, the omission of the text under consideration.

Sometimes the problems we see come from outside circumstances conflicting with the way our mind sees the issue in the first place. Here's what I'm trying to get at:

We may see the issue as being "What is this command going to do to the text before me?" And what the commands do *does* seem opposite to each other. But if we see it as "What will this command do to the established procedure?" the resuilt isn't so weird. To overcome the Insert process, the new text gets omitted. To overcome the prior editorial correction, the new text (a different item in this case) also gets omitted.

Contradictory procedures are both being overcome. Consistent, No?

------------------------

In the March 24 newsletter, Ed Millis asked for help with the final checking of a document, including, as he wrote, "ensur[ing] all tables and figures are numbered correctly and correspond to their text mention, mak[ing] sure every paragraph has the proper indent and reference (every (a) has a (b), and it's not (b) when it should be (2), and I didn't overlook any abbreviations."

The generous and brilliant Eric Fletcher responded:

I run into similar types of issues as described by your reader Ed Millis, but would never consider printing the document! IMHO, viewing it on the screen is not only less wasteful of paper, but with a few tweaks, you can focus specifically on the particular issue.

I would use Find & Replace's wild card feature to highlight all elements contained within parentheses, then put the file in normal view (zoomed up quite large so I could lean back and do my review with mouse only . . . ), use the Find dialog to find the first instance of a highlight, then use the downward pointing icon in the lower left of the vertical scrollbar to skip through and review all of the others.

For abbreviations, you can pull everything in all caps to a second document, then sort it and look for anomalies. Use Find with wildcards to look for the pattern "[A-Z]{2,5}" (to get all instances of 2-5 capital letters) but choose "Find All" instead of the normal Find. This will select all instances. Drop out of the dialog and Ctrl-C to copy. Make a new document and Paste: you will have a complete set of all found items. When sorted, abbreviations that don't look right are easy to spot.

In fact, for this application, I typically set the abbreviations in their own character style so I can pull them for generating an acronym list. Some abbreviations don't follow the all caps rule ("SoS/E" is a recent example in a book I'm working on for example), but if I have a button to attach the style, it is easy to do as I encounter it. Then, later, I can pull anything tagged with the "abbreviation" style to help create the acronym list.

I have a little macro that helps me correct all other instances of a selection and set them in a character style. I needed it to set Latin names in a document where they needed to be ignored for spell check, but were inconsistently spelled and presented in the supplied content. For example, "tuberosa" was sometimes "tuberaso" but both needed to be tagged as my "Latin" style. As I review words that had been set in italics (Find, Ctrl-i), and came across a word I had not yet set, I can select it and click my SetLatin button. The VBA code presents "tuberaso" (selected) in a dialog and lets me type in "tuberosa". When I click Okay, it uses the VBA Replace all to fix any other instances throughout the document. What makes this particularly helpful is that I have the "Latin" character style set in a temporary colour (say purple) so that as I progress through the document, terms I've dealt with show up distinctly because they are coloured. I then reset the colour to automatic within the style definition before I complete the job. Here's the code I use (it can be modified to fit other requirements):

[Editor's note: I've broken lines so they'll work when copied from this email newsletter. Also, before using the macro, you must create a character style named "Latin." You should take seriously Eric's suggestion to modify the macro to fit other requirements; this macro could be a very useful tool for many purposes.]

'THE MACRO STARTS HERE
Sub SetLatin()
' Proposes to replace the selected string
' with whatever you type in,
' and applies the Latin character style
' to each instance.
'
' Set up to deal with correcting
' all instances of italicized words
' in a scanned document (e.g., Latin names)
' because they can be both misinterpreted
' and need to be set in italics consistently.
Dim strReplacement As String
strReplacement = _
InputBox("Replace all instances of [" & _
Selection.Text & _
"] with whatever is entered below, " & _
"and also set each with the " & _
"Latin character style.", _
"Set all like this as Latin", _
Selection.Text)
If strReplacement <> "" Then
With ActiveDocument.Range.Find
.Text = Selection.Text
.MatchWholeWord = True
.Replacement.Text = strReplacement
.Replacement.Style = _
ActiveDocument.Styles("Latin")
.Execute Replace:=wdReplaceAll, _
Forward:=True, Wrap:=wdFindContinue
End With
End If
End Sub
'THE MACRO ENDS HERE

The advantage of using code like this is that it doesn't change what you have set in the Find & Replace dialog. If I did it within the dialog, I'd need to remember to turn off the style the next time I used the dialog. I have several little chunks of code for such things, and it can really improve the efficiency of reviewing.

Incidentally, my temporary colour method can also be very handy for setting styles. If the main body styles area all defined to be based on, say, Body Text, I can set its colour to green. Then, as I tag the content by whatever method, the paragraphs with my styles attached will show up in green so I can concentrate on the non-green content. This is particularly useful if you use either Find & Replace to help tag, or use the "Select all instances" option available from the Styles and Formatting task pane. Either way enables you to assign styles "blindly," but with the colour, you can see what remains to be tagged manually as you review.

This is probably only peripherally relevant to Ed's question, but hopefully some of it will apply!

------------------------

Many thanks to Ed and Eric.

_________________________________________

RESOURCES

Are you writing for the web, or editing text to be published on the web? You'll find the Web Style Guide to be an invaluable aid:

http://www.webstyleguide.com/

Correcting Misspelled Words

In our last episode, I provided a macro to make a list of misspelled words found in a document. You'll find the macro here:

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

So you've got your list; now how do you use it?

The way *I* recently used it on a multivolume typesetting project was to automatically fix a bunch of archaic (along with just plain wrong) spellings. Here's what I did:

1. Sorted the misspelled words alphabetically.

2. Removed duplicates.

3. Put each word beside itself, separated by a pipe symbol, so the lines looked like this:

fulfil|fulfil

fulness|fulness

kanyon|kanyon

4. Corrected the spelling of the words on the right side of the list:

fulfil|fulfill

fulness|fullness

kanyon|canyon

5. Used the list with my MegaReplacer program to automatically replace the misspelled words on the left with the correctly spelled words on the right--in all the chapters of all the volumes. Whew! More on MegaReplacer here:

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

Of course, it would have been nice to have a macro that did steps 1 through 3 for me (sort misspelled words, remove duplicates, put each word beside itself). So I made one. And I'll share:

'THE MACRO STARTS HERE
Sub MakeCorrectionList()
'Define variables
Dim Para1$
Dim Para2$
Dim aPara
'Sort words alphabetically
Selection.WholeStory
Selection.Sort
'Delete duplicate words
Selection.WholeStory
For Each aPara In ActiveDocument.Paragraphs
Para2$ = aPara
If Para1$ = Para2$ Then
aPara.Range.Delete
Else
Para1$ = Para2$
End If
Next
'Duplicate list side by side
'with pipe symbol separating
Selection.WholeStory
Selection.ConvertToTable _
Separator:=wdSeparateByParagraphs
Selection.Copy
Selection.InsertColumnsRight
Selection.Paste
Selection.Tables(1).Select
Selection.Rows.ConvertToText _
Separator:="|", NestedTables:=True
'Add code indicating Match
'Case and Whole Word Only
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
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
Selection.HomeKey Unit:=wdStory
End Sub
'THE MACRO ENDS HERE

If you don't know how to use such macros, you'll find instructions here:

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

That last bit, "Add code indicating Match Case and Whole Word Only," is for use by MegaReplacer, and it will add +& at the end of each entry. In addition, at the bottom of the list, you'll get one final carriage return preceded by +&. You should delete that line before using the list with MegaReplacer.

You may find other uses for the macro as well--or at least pieces of it. For example, this part will delete duplicate paragraphs (i.e., single words on a line) in any list:

'THE MACRO STARTS HERE
Sub DeleteDuplicates()
'Delete duplicate words (i.e., paragraphs)
Dim Para1$
Dim Para2$
Dim aPara
For Each aPara In ActiveDocument.Paragraphs
Para2$ = aPara
If Para1$ = Para2$ Then
aPara.Range.Delete
Else
Para1$ = Para2$
End If
Next
End Sub
'THE MACRO ENDS HERE

And the following part will create a two-column table with the list of words in each column. You can then use the table as the basis for an index concordance. More here:

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

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

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

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

'THE MACRO STARTS HERE
'Sub MakeConcordanceTable()
'Duplicate list side by side in a table
Selection.WholeStory
Selection.ConvertToTable Separator:=wdSeparateByParagraphs
Selection.Copy
Selection.InsertColumnsRight
Selection.Paste
End Sub
'THE MACRO ENDS HERE

_________________________________________

READERS WRITE

Niquette Kelcher wrote:

I have a wildcard question for you that I haven't been able to figure out. I'd like to supply the answer to my students, who have been trying to figure it out with me.

If I have a manuscript with "Titles in Quotations Like This", how do I italicize the title AND get rid of the quotation marks at the same time? My incorrect approach is as follows -- it italicizes the text but doesn't get rid of the quotation marks. I feel I'm missing something obvious!

Find: "*" (use wildcards)

Replace: ^& (Ctrl + I)

Your help would surely be appreciated!

I responded:

You'll need to put the asterisk inside parentheses so it functions as a "group":

Find: "(*)" (use wildcards)

Then use the "Find What Expression" code as the replacement for the text found by the group:

Replace: 1 (Ctrl + I)

More information here:

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

--------------------------------

Ed Millis wrote:

I write/edit technical report documents. I am not in charge of creating them; they are simply emailed to me or handed over on a CD, and I get to insert data and format to a fine finish. Either the document or the data can come in any format or mixture of styles, including web page and Excel file, and with or without automatic bullets, lists, and indents.

So the first thing I do is reformat everything to a Normal style, no automatic anything, and set my tabs. Then, as I go through the document, I apply formatting or style to create headings and table or figure labels.

The last thing I do with one of these reports (often up to 200 pages) is print out a low-resolution non-color copy so I can go over it with pen in hand to ensure all tables and figures are numbered correctly and correspond to their text mention, make sure every paragraph has the proper indent and reference (every (a) has a (b), and it's not (b) when it should be (2), and I didn't overlook any abbreviations.

Has anything crossed the desk of the Editorium that might make dealing with those last items a bit easier?

I responded:

No. But it's an interesting question. I'll look into it.

Not having been able to find an answer, I appeal to you, gentle reader. Do you have a solution for Ed?

Many thanks to Niquette and Ed.

_________________________________________

RESOURCES

Need an online style guide for easy reference? Try the Wikipedia Manual of Style:

http://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style

Need something more thorough? Try the Guide to Grammar and Style, by Jack Lynch at Rutgers:

http://andromeda.rutgers.edu/~jlynch/Writing/

Listing Misspelled Words

I've been working on a really big set of really big books that use odd, archaic spellings. Wanting to modernize those spellings, I decided to create a macro that would list every word that Microsoft Word sees as misspelled. You'll find the macro a little farther down, but before using it, you'll need to tell the macro where the misspellings are to be recorded. There are three options:

OPTION 1

List the errors at the end of your document.

OPTION 2

List the errors in a new document.

OPTION 3

List the errors in the document in the next window, such as a new, blank document you've already created.

You'll specify the number of your option in the following line in the macro:

myOption = 1

If you use option 3, you can use my MultiMacro program to run the macro on a whole folder full of documents, which will give you a nice, long list of misspellings at the end of your MultiMacro list (assuming your documents have misspellings). More information here:

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

Once you've got that list, you can use it to *automatically* fix the misspellings. How? Stay tuned; I'll reveal the secret (and give you another macro) next week.

And now, here's the macro:

'THE MACRO STARTS HERE
Sub ListSpellingErrors()
Dim myDoc As Document
Dim myErrorCount As Integer
Dim e As Integer
Dim myOption As Integer
'*****************
'CHOOSE ONE OF THE FOLLOWING
'THREE OPTIONS:
'OPTION 1
'List the errors at the end of
'your document.
'OPTION 2
'List the errors in a new
'document.
'OPTION 3
'List the errors in the document
'in the next window, such as a new,
'blank document you've already created,
'or a MultiMacro list.
'Specify the number of your option
'in the following line:
myOption = 1
'*****************
'Macro specifies the current document:
Set myDoc = ActiveDocument
'Macro tells Word the document hasn't
'already been spell-checked
'(whether it has or not):
myDoc.SpellingChecked = False
'But if you want Word to remember
'spell-checking you've already done,
'put an apostrophe in front
'of the command above, which turns
'off the command.
'Macro counts the number of errors
'in the document:
myErrorCount = myDoc.SpellingErrors.Count
If myOption = 1 Then
Selection.EndKey Unit:=wdStory
ElseIf myOption = 2 Then
Documents.Add
ElseIf myOption = 3 Then
If Windows.Count >= 2 Then
WordBasic.NextWindow
Else
MsgBox "Only one document open."
GoTo EndMacro
End If
End If
'Now type the misspellings into
'the specified location:
For e = 1 To myErrorCount
Selection.TypeText Text:=myDoc.SpellingErrors(e)
Selection.TypeParagraph
Next e
If myOption = 3 Then
WordBasic.NextWindow
End If
EndMacro:
End Sub
'THE MACRO ENDS HERE

If you don't know how to use such macros, you'll find instructions here:

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

_________________________________________

READERS WRITE

Eric Fletcher wrote:

In your February 24 Editorium Update, you quoted Alan Shepard's note about images being messed up, and then a tip about printing without images. I am a big promoter of using only linked rather than embedded images. This not only keeps a Word document smaller but also leaves the source image unchanged. Moreover, if you have all linked images saved in a specific folder relative to the documents, you have the means to manage some otherwise complicated print issues.

For example, if I need to produce a publication for both screen viewing (or low-res print) and a high quality photosetter (offset press, for example), I prepare the images in the best quality for the latter and save them in a folder below where the Word documents are being saved (I use "art/highres"). I then copy the images "up" one level, and prepare the Word document with links to the named images within the "art" folder. This lets me print in the best quality possible for the photosetter, but can really bog down a lower resolution printer--and makes screen refresh irritating and unnecessarily slow.

So here's the trick: To prepare the lower-res version, I then use a batch function of an image editor to make copies of all of the high-res images in a more suitable resolution and save them to a different folder (I use "art/lowres") without changing their names. I then copy everything from this folder up into the "art" folder, replacing the high res versions. The links within the Word documents now point to lower-res versions of the same named images (i.e., a field like { INCLUDEPICTURE "art/c03f12migration.tif" d } will point to whatever image is named "c03f12migration.tif" in the "art" folder, so Word will use that image when the page is recalculated for display or printing).

Using the same approach, I could have the batch routine in my image editor alter the images to retain the dimensions but remove all content (turn lightness to 100% for example) and resave to a third folder ("art/nores" maybe?). Copying these images up to replace the ones in my target "art" folder would then result in a document linking to "empty" images--and since the sizes would be the same, any text flow would not be affected. (This would mimic the placeholder behaviour Word provides through the Options View dialog.)

Word can do a lot, but it was never designed to be an image processor.

Many thanks to Eric!

_________________________________________

RESOURCES

The fabulous (in my opinion) Wikipedia uses some excellent "misspelling" lists to maintain consistency. You, too, can use these lists, if you want to. They're available here:

http://en.wikipedia.org/wiki/Wikipedia:List_of_common_misspellings

The lists could be used (with a little tweaking) with my MegaReplacer program:

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

Wordperfect Weirdness Revisited

Back in January 2003 I published an article called "WordPerfect Weirdness," which featured a macro for converting "special" characters (dashes, quotation marks, and the like) in a file imported from WordPerfect to Word. You can read the article here:

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

Unfortunately, the macro isn't reliable with more recent versions of Word, and I needed an updated version (some of those authors are still using WordPerfect). If you need one too, here it is (for PC or Macintosh; yes, it still has some WordBasic in it):

'THE MACRO STARTS HERE
Sub FixWPWeirdness()
' Courtesy of The Editorium (www.editorium.com)
Dim a
Dim i
Dim FalseChar$
Dim TrueChar$
Dim ThisChar
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
'Check for platform
a = InStr(WordBasic.[AppInfo$](1), "Macintosh")
For i = 1 To 6
'Set find and replace variables
Select Case i
Case 1
FalseChar$ = "C"
If a Then
TrueChar$ = Chr(209)
Else
TrueChar$ = Chr(151)
End If
Case 2
FalseChar$ = "B"
If a Then
TrueChar$ = Chr(208)
Else
TrueChar$ = Chr(150)
End If
Case 3
FalseChar$ = "A"
If a Then
TrueChar$ = Chr(210)
Else
TrueChar$ = Chr(147)
End If
Case 4
FalseChar$ = "@"
If a Then
TrueChar$ = Chr(211)
Else
TrueChar$ = Chr(148)
End If
Case 5
FalseChar$ = ">"
If a Then
TrueChar$ = Chr(212)
Else
TrueChar$ = Chr(145)
End If
Case 6
FalseChar$ = "="
If a Then
TrueChar$ = Chr(213)
Else
TrueChar$ = Chr(146)
End If
Case Else
End Select
'Find and replace characters
With Selection.Find
.Text = FalseChar$
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
While WordBasic.EditFindFound()
ThisChar = Asc(WordBasic.[Selection$]())
If ThisChar = 40 Then
WordBasic.EditClear
WordBasic.Insert TrueChar$
End If
Selection.Find.Execute
Wend
Next i
End Sub
'THE MACRO ENDS HERE

If you don't know how to use such macros, you'll find instructions here:

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

For ease of use, you might want to attach the macro to a keyboard shortcut, as explained here:

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

_________________________________________

READERS WRITE

The newsletter for February 9 featured an article called "Macros for Intuitively Reviewing Tracked Revisions":

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

After reading the article, Hilary Powers wrote:

Regarding your tracking-review macros: I think they'd drive me crazy. Maybe I've been doing this too long, but my thought process runs purely to "keep this change" and "don't keep this change" without reference to whether the underlying text will thereby be restored or removed.

This probably works for me because I never, ever review each and every revision and decide upon its fate individually.

When I go through an edited manuscript after the author has indicated what should happen to it, I first move from one of the author's comments or adjustments to the next, eyeballing for the author's tracking color. In each case, I fix that part of the manuscript so it does what the author wants (which may or may not be precisely what the author asked for). In the process, I try to delete all the queries I've put into the text.

Then I simply approve all the changes remaining in the manuscript, holus bolus--after which I have a whole array of very quick scans to make sure that no queries escaped and nothing else bad happened as a result.

For me, that's intuitive.

Many thanks to Hilary.

_________________________________________

RESOURCES

The U.S. Department of Labor Bureau offers interesting occupational and salary information for writers and editors:

http://www.bls.gov/oco/print/ocos089.htm

Magic Numbers

When I was in first grade, a magician came to our school, and I've been interested in magic ever since. One thing I've learned is that magic is largely psychological; it depends heavily on what magicians call "misdirection"--getting the audience to look at or think about something that furthers the magician's deception.

This principle can be used in software, too, as I recently discovered when putting together my Author Tools template:

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

Microsoft Word is notorious for getting automatically numbered lists out of whack, but the Author Tools template handles them quite nicely, mostly because of a little trick--Word's ability to reset the start of a list.

If you've used Word's automatically numbered lists, you've probably noticed that *any* lists in the document are actually part of the *same* list. So, if you make a list like this--

1. Bread.

2. Peanut butter.

3. Pickles.

--and then type some unnumbered text after it, as I'm doing with this paragraph--then the next list you make will look like this:

4. Chihuahuas.

5. Dachshunds.

6. Basset hounds.

The second list is numbered with the first, but obviously it shouldn't be. Fortunately, you can reset the numbering (and apply a numbered style) with this macro:


Sub ListNumberedStart()
With Selection.Paragraphs
.Style = "List Number"
With .First.Range.ListFormat
.ApplyListTemplate .ListTemplate, False
End With
End With
End Sub

If you don't know how to use such macros, you'll find instructions here:

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

For ease of use, you might want to attach the macro to a keyboard shortcut, as explained here:

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

And now for the magical misdirection: Instead of using the macro to *restart* an existing list, use it every time you need to *start* a new list. If you need to continue an existing list, use Word's automatic numbering feature (which you'd usually use to start a list). Notice that this is exactly the opposite of what you might think should happen. But presto! It works!

By the way, when I talk about Word's automatic numbering feature, I am *not* talking about the buttons on the formatting toolbar, which will cause you no end of trouble. Instead, I'm talking about using paragraph styles that *include* the numbering--in this case, the one named List Number.

Rumor has it that Word wizard and MVP Steve Hudson is helping Microsoft solve their numbering problems for the next release of Word. I sure hope so.

More on Steve's stuff here:

http://www.geocities.com/word_heretic/

_________________________________________

READERS WRITE

Aaron Shepard wrote:

"I came across a bad problem in Word 2004 for Mac. Unlike Windows versions and former Mac versions, this one antialiases all imported graphics, and will even change black-and-white line art to grayscale to do it. That means fuzzy charts and diagrams when printed. It's a scandal.

"The only way to avoid it is to insert art as EPS. On the Mac, that also enables you to place a CMYK graphic!"

Recently on the Word-PC List, Kristen Ebert-Wagner asked how to keep Word from printing graphics--in other words, how to print text only. I suggested that she try importing the Word document into OpenOffice.org Writer and printing from there:

http://www.openoffice.org

Kristen reported:

"It works! OfficeWriter distinguishes between graphics and drawing objects and, furthermore, allows you to include and/or exclude either in printing. Word offers this option for drawing objects only. Thanks--this is a fast, easy solution."

I thought this might be worth passing on for others who are faced with the same problem.

Many thanks to Aaron and Kristen.

_________________________________________

RESOURCES

Wondering about the upcoming release of Microsoft Office 2007? You'll find the official explanation here:

http://www.microsoft.com/office/preview/default.mspx

But if you want the inside scoop, see Jensen Harris: An Office User Interface Blog:

http://blogs.msdn.com/jensenh/default.aspx

Author Tools Template

I'm constantly having to clean up files from authors. Most of them have no clue about how a manuscript should be structured or formatted. That's why I've created an Author Tools template--to help authors write, structure, and format their manuscripts in an easy, consistent way. (And, of course, to simplify my life--and possibly yours.) You can download the template (at no charge)--along with complete instructions for using it--here:

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

Like the template? Feel free to share it. Pass it around! Give it away! The main point of the template is to give it to authors who need it. If you can get them to use it, it should help prevent the following problems:

* Inconsistently applied formatting.

* Unstyled text.

* Messed-up footnotes and endnotes.

* Inconsistent chapter (and other) numbering.

And that should make your work easier. It will also make writing easier and more productive for the authors with whom you work. You may even want to use it yourself. I know I'm going to.

Don't like the template? Let me know! I'd love to have any suggestions for improving what I hope will be a useful tool for authors.

mailto:editor [at symbol] editorium.com

Do you have an author template you'd be willing to share with readers of Editorium Update? If so, please email it to me, and I'll make it available in the next newsletter. Thanks!

_________________________________________

READERS WRITE

Eric Fletcher wrote:

Further to your article about displaying function keys (2005-10-27), you can also generate a list of all mapped function keys via the Tools > Macros menu. In the "Macros in" box, choose "Word commands" then scroll down to choose "ListCommands" and click Run. The dialog that comes up lets you select either the current menu and keyboard settings (default) or all Word commands.

The resulting table presents each command alphabetically with the key and modifiers to get at it (as well as the menu where you can access it if applicable). Sort the table by key to see the keyboard mapping for the function keys.

On my system, choosing "all Word commands" generates a 30-page table: more than I care to print, but interesting to browse through to discover commands or keyboard shortcuts you may not have been aware of! (Did you know that Ctrl-Shift-G brings up the Word Count dialog? I didn't.)

Unfortunately, the table doesn't include a description column but if you want to find out what a command does, click on it in the Tools > Macros dialog and read the greyed-out description displayed at the bottom. If you click Run, it will invoke the command--the only way I could see the details for the oddly-named "Options Fuzzy" command!

The table will include any keyboard or menu assignments you may have made as well.

Thanks, Eric!

_________________________________________

RESOURCES

You'll find some other author templates here:

http://www.wiley.com/WileyCDA/Section/id-862.html

http://books.elsevier.com/authors/guide/template.asp

http://www.witpress.com/author_instruction.html

http://cslipublications.stanford.edu/site/authors.html

http://www.thomsoncustom.com/authors/templates.html

Worth checking out!

Inserting Unlinked Sections

Microsoft Word, in a broad sense, has two kinds of section breaks (Insert > Break):

1. The kind that starts a new page (which includes "Next page," "Even page," and "Odd page).

2. The kind that doesn't (which includes "Continuous").

The second kind is used for such things as inserting two-column text in the middle of single-column text, all on the same page, and it doesn't concern us here. What does concern us, as editors, is what happens when we insert a section break that starts a new page.

By default, Word "links" the headers and footers in the new section to those in the previous section. In other words, when you insert a section break, the headers and footers will be the same in the new section as in the old. If you're working as an office assistant and spend most of your time formatting letters and reports, that might be exactly what you want. But if you're a book editor, that's probably *not* what you want. You probably want each section (that is, each *chapter*) to have its own headers and footers, as explained here:

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

In a previous newsletter, I supplied a macro that would unlink *all* headers and footers en masse:

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

But wouldn't it be nice to be able to simply insert an *unlinked* section break? Here's a macro that will do just that, using a break of the "Next page" variety:


Sub InsertUnlinkedNextpageSection()
Selection.InsertBreak Type:=wdSectionBreakNextPage
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.LinkToPrevious = Not Selection.HeaderFooter. _
LinkToPrevious
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

If you don't know how to use such macros, you can learn how here:

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

Note that you can modify the macro to insert an odd-page section break or an even-page section break, which are particularly useful in book publishing. To do so, change this line--

Selection.InsertBreak Type:=wdSectionBreakNextPage

to this--

Selection.InsertBreak Type:=wdSectionBreakOddPage

or this--

Selection.InsertBreak Type:=wdSectionBreakEvenPage

For ease of use, I'd recommend that you hook the macro to a menu, toolbar button, or keyboard shortcut, as explained here:

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

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

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

Then, the next time you insert a section break (using the macro, of course), it will be automatically unlinked!

_________________________________________

RESOURCES

You'll find a very nice tutorial on sections, section breaks, and headers and footers at Charles Kenyon's AddBalance website:

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

Especially if you work in a legal environment, you'll find many other useful resources at the site. Don't overlook the complete, downloadable User Guide (scroll down to the bottom of the page):

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

Displaying Function Keys

Remember WordPerfect, with its cardboard template that showed which function keys did what? I liked it; you can tell because I created similar templates for my Editor's ToolKit and DEXter programs:

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

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

But if you just want to see the function-key assignments in regular old Microsoft Word (2000 and above), there is a secret way:

1. Click Tools > Customize.

2. Click the Toolbars tab.

3. Put a check in the box labelled "Function Key Display."

4. Click the Close button.

At the bottom of your screen, you should now see a toolbar that displays Word's function-key assignments. You can move or float it just like any other toolbar. If you like, you can click the "keys" on the toolbar with your mouse while holding down the SHIFT key, the CTRL key, key combinations, and so on to reveal the various functions of the keys. But why not just use the keyboard?

As you type or edit, the toolbar will change. Different functions will become grayed out or even hidden, depending on what you are doing. It's a handy tool to see what functions are available on those keys.

If you want to *print* a list of the function-key assignments, do this:

1. Click File > Print.

2. In the "Print what" dropdown list, select "Key assignments."

3. Click the OK button.

You can also see a list on-screen:

1. Click Help > Microsoft Office Word Help.

2. Click the Answer Wizard tab.

3. Type "function keys" in the "Search for" box.

4. Press ENTER.

5. Click "Keyboard shortcuts for Word" in the Task Pane.

6. Click the items in which you are interested. A list of functions and their associated keys will be displayed. You can also click "Show All" at the top of the window to display *all* of the keys and their functions. Note that you can print this information by clicking the printer icon at the top of the window.

I highly recommend learning all of Word's keyboard shortcuts. No more reaching for the mouse!

_________________________________________

READERS WRITE

After reading the September 1 article, "Managing Projects and Tasks in Microsoft Outlook," Brad Hurley wrote:

I also use Outlook for managing projects and tasks, and like you I work on many projects simultaneously, but my system is very pared-down and simple.

I don't bother assigning categories to tasks or organizing them in any way; I just focus on creating a deadline for each task and then setting a reminder for that deadline far enough in advance so I can meet it.

My project deadlines are usually determined by my clients. When I put together a "creative brief" or description of the project for a client, I also set up a schedule of due dates for milestones along the way. In Outlook, I create a new task for each of those milestones and assign it a due date. Outlook automatically uses the due date as the reminder date, but I change the reminder date manually so I get reminded well in advance of the date something is due. For example, if I have a Web article due on September 14 and know I need a week to write it, I'll set the due date for September 14 and the reminder date to September 7. No need to put anything on my calendar; at 8:00 a.m. on September 7, Outlook will pop up a reminder that I need to start working on that article. I start working on it, and I hit the "snooze" button to remind me again in a day or two in case I get distracted by another task. Once the task is done, I mark it as complete in Outlook.

In older versions of Outlook, each task reminder would pop up in its own window, which got to be annoying when lots of reminders came up at once. One of the great features of Outlook 2003 is that it puts all the reminders in one window, which to me was worth the price of the upgrade. When the reminder window pops up, I can see at a glance all the things that are on my plate; I snooze them if I don't have time to work on them right away, and then I'm reminded again in a few hours or days, depending on the snooze time.

One more thing: when an e-mail comes in that requires me to take some sort of action, I just drag it to my task button to create a task for it, assign a due date and a reminder date, and then move the e-mail out of my in-box. The only things I ever put on my Outlook calendar are meetings and appointments.

It's true that with this approach I can't sort my tasks by project or client, but to me that doesn't matter. What matters is that I get reminded when I have to start work on something and that I know when it's due. I've been using this simple system for about four years now, and it works well for me.

Many thanks to Brad!

_________________________________________

RESOURCES

EditFast is an online proofreading and editing service, so if you need help--or want to provide help--it may be a good place to look:

http://www.editfast.com/

The site also provides some useful tools, including a grammar resource, a world clock, a currency converter, and a free editorial newsletter:

http://www.editfast.com/english/editoria.htm

Why not sign up?

Wildcard Searching and Multiple Paragraph Breaks

In trying to explain how Word's Find and Replace (FnR) wildcard mechanism works, I'll also present a practical solution to the multitude of problems encountered by the seemingly innocuous ^p^p to ^p, whose usual objective is to remove unnecessary blank lines. In doing so, we shall traverse the width of Word's pitfalls that never fail to trip up a traveller.

First up, the Word Help system has some excellent help on wildcards. It is a complete pain to access, but you can find something. In Word 2000: F1 - help > Answer Wizard | Index > Search on: wildcard. The second topic down is the master list of all FnR stuff. Select it. Pick the Wildcard Characters topic down that list. Now select the *type a wildcard* hyperlink. Hooray! Print it out, fast, and use it as a guide from now on. You have just found the first excellent Quick Reference in the Help system.

The very last two paragraphs are the key to what I am attempting here.

To replace double paragraph breaks with a single one, we would think that finding ^p^p and replacing with ^p would do the job, right?

Well, not really. If you do it via VBA, you find yourself stalling forever if your document is terminated by a blank paragraph, as you have to perform it iteratively until you get a Not Found condition. Why does it fail to replace the last paragraph mark? Well, you *can't* delete the last paragraph mark--ever. When you a start a brand new virgin document and turn on View Formatting, that paragraph mark you see is the End Of Document paragraph mark. As the document does exist and thus has a finite end point, that magic pilcrow (backward P) has to appear. It is also the marker point in memory to place the nasty little objects we infest our nice clean ASCII text with: style definitions, table formatting, list templates, graphical objects, and the list goes on. See Alt + F11 > F2 > Enter for more information.

So, to get around the VBA problem, we simply pre-process the final paragraph. If it is blank (just a paragraph mark), then kill the second-to-last character--which must be the penultimate paragraph mark. Manually, press CTRL + END and use the backspace key as often as required.

The main problem with the simple FnR replace postulation is similar. If you just delete a paragraph mark, you lose the style for that paragraph. So, we can get around that by ensuring it is always the trailing paragraph that gets deleted. It won't do the final blank paragraph in a document, but that is solved above.

First, we need to understand how the brackets work, and the Help topic explains that nicely. So let us put the guide into good use. (^p)^p means that we have marked the first paragraph mark as our first "text chunk." If we use 1 in the replace string, it means to leave the first text chunk--the paragraph mark with the holy styling applied--in place. Unfortunately for us, we still haven't got there yet.

Why? We get an error: We can't use ^p if we are using wildcards. ($#%*! Microsoft.) So we have to use ^013 instead. Herein lies our next problem--paragraph marks that aren't! Oh, yes, kiddies, just because you see a pilcrow does not mean you are looking at a paragraph mark. Oh no. Not with Paste Special and even weirder applications handing in Clipboard data streams without thought. Word dutifully displays a pilcrow when it encounters an ASCII 013, but the background machinery may not have resolved into a paragraph object to be kept dynamically updated.

How do I know it is ASCII 013? Well, I cheat. I select the paragraph mark, or whatever character I need to know, and use VBA: Alt + F11 (VB Editor or the VBE), CTRL + G (Immediate Window), Enter: ? ASCW(Selection)

I use ASCW() rather than ASC() because I want the full Unicode value. For ASCII characters, the Unicode value is the same. Go ahead, work out the wildcards' ASCII numbers and write them on your guide.

So, if we are going to use replace (^013)^013 with ^013, we have to make sure every ASCII 13 is a bona fide paragraph mark. Without wildcards on, find ^013 and replace it with ^p. Honest paragraphs will see no change; fake paragraphs get converted to your will on the spot.

Now you can get serious and stick your wildcard search on. Replace (^013)^013 with 1 and we're in the clear. Done.

In a similar fashion, the much simpler exercise of replacing a colon that occurs after a ket--a ")" character--without destroying the ket itself, would be to use wildcards and replace (^041)^058 with 1.

However, if we were searching for a bra--a "(" character--we would run into another peculiar little Word problem with managing RTF strings. If you insert a symbol from the Wingdings range, or many other non-Unicode graphical fonts, Word actually stores a marker there instead, and then it stores the actual font character off beyond the end of the section mark. That marker is ASCII 40, our unfortunate bra. So an ^040^058 sequence could very well be *any* symbol followed by a colon.

If we were using two blank paragraphs before every heading and no space before to ensure that our new pages always start at the very top, no matter the method used to page break, and we wanted to get rid of scads of three or more blank paragraphs in excess of a single hit (are we listening, VBA people?), we could do something evil and wicked like this: find (^013{2,2})(^013)@ and replace it with 1. That leaves us with a maximum of two following blank paragraphs anywhere in the document, even at the end--in one single Find operation.

Interestingly enough, for those still able to follow, (^013{2,2})^013{1,} fails with an invalid pattern. I forced it with the brackets for the above solution.

That brings us to the final solution for editors and writers seeking to mass destroy all blank lines. It has taken a while, but boy haven't we learned a lot of useless stuff about Word on the way! Find (^013)(^013)@ and replace it with 1 to kill all blank paragraphs in a single pass, with the exception of the first paragraph (there is no start-of-document paragraph mark to give us a two-in-a-row target) and the last paragraph mark (which is excluded from the Find range).

Copyright 2005 by Steve Hudson. All rights reserved.

Word Heretic, Sydney, Australia

Tricky stuff with Word or words for you.

www.wordheretic.com

ABN: 86 453 419 554

"Qualified Good Tech Writer Dude"

Free Association of Words Without prejudice

_________________________________________

READERS WRITE

In the August 19 newsletter, Pru Harrison asked about how to make sure commas following italicized text are not themselves italicized. The newsletter included one solution, but reader Jeanne Pinault sent an additional one:

"Replace [any letter] [comma] [italic] with [^&,] [not italic] and you get two not italic commas for every italic comma you started with. Then replace the double commas with single commas and run through and fix the relatively few that need to stay italic. I got a bunch of tildes when I tried it your way, but I have Windows XP, and it won't let FileCleaner replace hyphens in number ranges in live notes, where I need it most, either. (My cure for that is to replace all the hyphens with en dashes and go back and fix the few places that need hyphens.)"

Many thanks to Jeanne!

_________________________________________

RESOURCES

Speaking of wildcard searching, if you haven't yet downloaded and read my free paper "Advanced Find and Replace in Microsoft Word," you owe it to yourself to do so. The techniques it explains will save you from having to make thousands of tedious, repetitive changes by hand. Understanding these techniques is, in my opinion, the most important thing you can do if you want to work more efficiently in Microsoft Word. You can download the paper by clicking here:

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