Have you ever had this happen in Microsoft Word? (search & replace problem)

I’m working on a book. Not the one I’ve posted about here a zillion times–an entirely different one, already sold. The manuscript’s about 220 pages & 75,000 words long, and divided into 16 chapters.

Per my editor’s request I decide to change the way a minor character in the novel is referred to. For the sake of argument, let’s say he was called Shipmaster and I want to call him Captain instead. Every time I do a global search & replace for those terms, the search hangs and the document gets frozen, forcing me to task manager my way out. I open the document again and try to do the search manually–that is, I have Word query me each time it gets to Shipmaster for an approval. It works for until it gets to chapter 5, at which point the search hangs and the program crashes again. I decide to simply search for shipmaster without enabling the replace function, instead typing in captain each time; the same thing happens. I try beginning the search from end of the document & going backwards; the same thing happens. Eventually I cut the document into 3 pieces–saving chapters 1-4 in one file, 5 in a file by itself, and 6 through 16 in a third file; at last I’m able to make it work, and then I reassemble the document.

Out of curiosity I did a search & replace on the main character and love interest, changing Richie to Fonzie and Joanie to Chachi. The names appear much more often than shipmaster did, but there was no such problem. I went back to the orginal document and tried to search & replace on master by itself; it hung up on chapter 5 again, the first time that master appeared by itself in the story.

Has anybody ever had anything like this happen before? Can anybody explain it?

Moved to GQ per request.

I don’t really know. But I have some WAGs, backed with some years of amateur experience helping people with this sort of thing, to offer after I get some more info out of you.

Many things start going wonky in Word with documents over about 150 pp. long, especially if they have any of the following: auto-generated index or Table of Contents, footnotes, tricky line-break formatting, a table of any kind, or images. Do you have any of those things? How about pagination?

It’s possible that the length of the names you were swapping played a role; were the problem-inducing ones much longer than the problem-free main character and love interest names? Or were the “Shipmaster” and “Captain” actually different lengths from each other? say for instance you were taking out “Al” and replacing it with “Qagdop the Mercotan’s zymolosely polydactile tongue”?

I am not familiar with your specific problem but I have been using various versions of Word since 1989 and I can tell you two facts about Word.

  1. I am shocked–shocked!–to say that it has bugs. Documents can become corrupt through the intended usage of the product and produce bizarre results thereafter. This is usually addressed by copying the entire contents into a fresh document.

  2. Word becomes difficult to use as documents get larger and more complex, and these corruptions tend to be more frequent and more bizarre. However, a book manuscript at 220 pages is not complex and not particularly large. (Efforts at trying to use Word to do a magazine layout, for example, would be frustrating.)

It’s fairly straightforward work of fiction, so the only one of those I have any need of it pagination.

The words I was using were abotu that length. Out of sheer curiosity, I opened a document of similar length, changed the word “sergeant” to “master,” then to "captain,’ then to "shipmaster,’ then "captain,’ and so forth. No such problems. And as I mentioned above, every time the problem occurred it was in approximately teh same place of the document–i.e., chapter five. It didn’t matter whether I started the search from the beginning fo the document and went down or from the end of hte document and went up.

Are you using Styles, or do you do spot-formatting?

Do you have Widow/Orphan Control turned on?

That was the first thing that occurred to me. Before my original post I did just that (copy the contents into a blank document) and the problem remained.

I can’t imagine using Word for such a purpose. That’s why Inanna gave us Adobe.

Spot-formatting. I don’t need a great deal of formatting anyway. Widow-orphan control is off, as I am composing a manuscript, not laying out a publication. The only way I worry about widows & orphans is ot make sure the last line of a chapter isn’t on a page by itself.

My guess is a small corruption tied to a paragraph in your fifth chapter. Sounds like you found a work-around for your problem so you’re no longer looking for a solution, just information?

In the future, I’d turn on your paragraph marks (it’s that button that looks like a backwards P with two lines). Select the entire document except the last paragraph mark in the document. Paste it all into a new doc. If you have section breaks, you might have to do that section by section.

Here’s a great resource for fixing corruptionin Word docs.

Spot-formatting can lead to what I, in my expert terminology, shall call “tangles” of invisible formatting contradictions. I suspect you have just such a tangle somewhere in Chapter 5 that does not play nice with others.

In short, and to oversimplify, Word stashes a bundle of formatting instructions after the last character in each paragraph. If you use Styles, this bundle is essentially bonded into a single instruction: “See Style X.” If you spot-format, this bundle is looser and contains more elements; one corresponding to each exception to “Normal Style” that occurs in that paragraph. Sometimes, when editing, the loose bundles get tangled (not completely unlike messed-up HTML tag nesting). A single tangle is often no problem; the problems start when multiple tangles interact with some function you want to do, such as search-and-replace, and challenges some background function, such as pagination, throwing Word into a loop where it can’t continue to search-and-replace until it repaginates, but it can’t repaginate because the search-and-replace is in the middle of two contradictory tangles.

Which is a longwinded way of agreeing with CookingWithGas. Word is buggy.

What you did, cutting up the manuscript into smaller pieces, fixing them, and then merging, is a pretty effective strategy that I use often. If you just copy the whole contents and put it in a new document, you’ve copied many of the tangles, too – all of the formatting attributes that are paragraph-based rather than document based.

Here’s something to try, if you have time to burn: Try copying all 16 chapters of text and, into a clean new document, pasting unformatted text (Edit > Paste Special > Unformatted Text), and then running your S&R. This will show whether or not the bug you’re facing is a paragraph-level format snafu.

I know as much about Word as I do precisely because Inanna failed to give Adobe to several of the offices in which I have worked. I’ve done some crazy stuff in Word, including magazine layout.

This is true.

Okay, this I’m not getting…how is that a help?

:eek:

You poor woman.

It helps because of where Word puts easily-corruptible format information: in paragraph and section breaks. If you don’t copy that usually-invisible paragraph marker (which, BTW, is called a pilcrow) you also don’t copy any tangle it may harbor.

It’s fun. The most challenging Word project I ever did was build, from scratch, a map of Collegetown in Ithaca, New York, solely with Word drawing objects, showing all the businesses in the area. I was really proud of that one. :cool:

Had I gotten here earlier, I’d have said right away that your document was corrupted, probably due to formatting. I would have recommended that you copy the offending chapter and save it as unformatted text into a new document; if that didn’t work, I’d have pasted it into Notepad, saved it, and copied it back.

(Actually, If I were writing a book on a Windows machine, I’d probably have written it in Wordperfect. But that’s just me.)

I got here too late to say what the others did: Microsoft Word is unsuited for long documents. I once did a 70-page manual in Word and it had issues. Granted, this was [del]in 1995[/del] a while ago, so Word may have improved. We used FrameMaker in my old job. Now I’m using either Apple Pages (for short personal documents) or Adobe Indesign (for brochures and other professional items).

For really long documents with plenty of cross-references and indexing, I’d probably grit my teeth and go back to FrameMaker, even though it has aspects that resemble black magic (reference pages, anyone)? My former co-worker set our manuals up in Structured Framemaker. It took months, but afterward made things so much easier.

I miss WordPerfect. :: sniff ::

It’s still available. :slight_smile:

I’m not a Word expert, but with some things, you have to accept that it’s damaged in some way you’ll never be able to detect, but which affects the program in some way. It’s annoying as heck, but it just happens sometimes.

Try copying the whole thing (or even just chapter 5) into a brand-new document. See if the problem goes away.