MS Office Forum / Word / Word Errors / August 2008
Conditional hyphens can cause Word 2007 SP1 Find & Replace to hang
|
|
Thread rating:  |
Jay Schlackman - 10 Jan 2008 15:40 GMT I have been dealing with an interesting problem one of my users brought to me which I believe has exposed a bug that has appeared in Word 2007 with SP1.
SUMMARY: Documents containing conditional hyphens can cause Word to hang and consume 100% CPU when using the Find or Find & Replace command.
VERSIONS FOUND AFFECTED: Word 2007 SP1 Specific build tested Microsoft Office Word 2007 (12.0.6212.1000) SP1 MSO (12.0.6213.1000) running on Vista Enterprise, Vista Enterprise SP1 RC v.688, and XP Professional SP2
VERSIONS NOT AFFECTED: Word 2003 (SP1 and SP2) Word 2007 (No SP)
VERSIONS UNTESTED: All other versions.
REPRODUCIBLE: 100% with identified versions.
STEPS TO REPRODUCE:
1. Open the identified affected version of Word.
2. (Optional for readability, does not affect test case) On the Home tab, in the Paragraph group, click Show/Hide to show formatting marks.
3. Type the word "Test"
4. Press the Enter key
5. Press the Tab key
6. Press the Enter key
7. Press Ctrl+- (Control + Hyphen) twice.
8. Press the Enter key
9. On the Home tab, in the Editing group, click Replace.
10. For 'Find what', enter "Test", and for 'Replace with', enter "Testing"
11. Click Replace All.
12. Observe that Word stops responding. Task Manager can be used to verify that Word is consuming as much CPU as possible (up to 100%)
BACKGROUND:
The user had a number of documents that she frequently re-used by opening an existing document, executing a Find & Replace > Replace All on a name in the document, and saving the modified file as a new document. We recently released Office 2007 SP1 through our WSUS server, and since then, the user had found that her normal Find & Replace method was causing Word to hang and consume 100% CPU, until Word was forcibly terminated using Task Manager.
After some investigation, I found that this behaviour can be reproduced when you have more than 1 consecutive conditional hyphen in the document at any point AFTER some other non-printing character (tested with tab and page break), and the Find function is used to the point where it passes the conditional hyphens. So, if Find All or Replace All is used, it will fail immediately, or if the single Find or Replace commands are used, it will fail as soon as it tries to search beyond the conditional hyphens.
In this case, the conditional hyphens had been entered accidentally, possibly years ago given the amount of time the user has been producing these documents. Removing them corrected her problem.
So far I have found this behaviour is only exhibited in Word 2007 SP1. I can't say for certain that I've narrowed it down completely; other non-printing characters may trigger this other than tab and page break, possibly other characters than conditional hyphens will trigger it too, but the above test case works for me every time.
I'd appreciate any input anyone can give!
Bob Buckland ?:-) - 11 Jan 2008 09:25 GMT Hi Jay,
Using MS Office Word 2007 SP1 on Windows XP SP2 I repeated the steps you gave and did not have a hang.
If you start Word in safe mode (holding ctrl key when clicking on the Word shortcut icon) do you get the same result?
Are there any of the Search Options selected in the Replace dialog under 'More'?
What language is set for the text in the document?
Are you using Word 97-2003 or Word 2007 document types as your default?
Have you recycled old temp files on the computer / server that can be left behind when Word is shut down in an abnormal manner and tried the test again?
From Start=>Find search on ~$*.*;*.tmp
========= I have been dealing with an interesting problem one of my users brought to me which I believe has exposed a bug that has appeared in Word 2007 with SP1.
SUMMARY: Documents containing conditional hyphens can cause Word to hang and consume 100% CPU when using the Find or Find & Replace command.
VERSIONS FOUND AFFECTED: Word 2007 SP1 Specific build tested Microsoft Office Word 2007 (12.0.6212.1000) SP1 MSO (12.0.6213.1000) running on Vista Enterprise, Vista Enterprise SP1 RC v.688, and XP Professional SP2
VERSIONS NOT AFFECTED: Word 2003 (SP1 and SP2) Word 2007 (No SP)
VERSIONS UNTESTED: All other versions.
REPRODUCIBLE: 100% with identified versions.
STEPS TO REPRODUCE:
1. Open the identified affected version of Word.
2. (Optional for readability, does not affect test case) On the Home tab, in the Paragraph group, click Show/Hide to show formatting marks.
3. Type the word "Test"
4. Press the Enter key
5. Press the Tab key
6. Press the Enter key
7. Press Ctrl+- (Control + Hyphen) twice.
8. Press the Enter key
9. On the Home tab, in the Editing group, click Replace.
10. For 'Find what', enter "Test", and for 'Replace with', enter "Testing"
11. Click Replace All.
12. Observe that Word stops responding. Task Manager can be used to verify that Word is consuming as much CPU as possible (up to 100%)
BACKGROUND:
The user had a number of documents that she frequently re-used by opening an existing document, executing a Find & Replace > Replace All on a name in the document, and saving the modified file as a new document. We recently released Office 2007 SP1 through our WSUS server, and since then, the user had found that her normal Find & Replace method was causing Word to hang and consume 100% CPU, until Word was forcibly terminated using Task Manager.
After some investigation, I found that this behaviour can be reproduced when you have more than 1 consecutive conditional hyphen in the document at any point AFTER some other non-printing character (tested with tab and page break), and the Find function is used to the point where it passes the conditional hyphens. So, if Find All or Replace All is used, it will fail immediately, or if the single Find or Replace commands are used, it will fail as soon as it tries to search beyond the conditional hyphens.
In this case, the conditional hyphens had been entered accidentally, possibly years ago given the amount of time the user has been producing these documents. Removing them corrected her problem.
So far I have found this behaviour is only exhibited in Word 2007 SP1. I can't say for certain that I've narrowed it down completely; other non-printing characters may trigger this other than tab and page break, possibly other characters than conditional hyphens will trigger it too, but the above test case works for me every time.
I'd appreciate any input anyone can give!>>
Jay Schlackman - 11 Jan 2008 21:29 GMT Bob, thanks for your reply, and sorry for my delay in getting back to you - hectic day here. Your findings are quite peculiar. I just tried my own test case on 2 previously untested home machines (one Office Enterprise on Vista Business, and one Office Professional Plus on Vista Business) and the original problem machine at work (Office Enterprise on XP SP2) and all crashed as before. I've tried this on about a dozen or so machines now, each time crashing as expected.
In response to your suggestions:
- It does happen in Safe Mode
- There are no search options set
- It happens when using either type of document format as the default
- The language is normally set to English UK, I tried setting to English US and the problem still occurred.
- I deleted all temp files from %temp% and confirmed no temp files matching your pattern were present on the system.
I can't think what else could be different. One thing I did notice while devising the test case is that if I enter just a single conditional hyphen, run the find & replace, then entered the second hyphen and run the test again, it does NOT hang. Only if entering the two hyphens at the same time in the same session does the problem occur. I don't suppose by some bizarre coincidence you've hit that my mistake?
After your suggestion about running in Safe Mode I also tried uninstalling the only plugin that is installed on these machines (Save As PDF and XPS), but that had no effect either.
Regards, Jay
> Hi Jay, > [quoted text clipped - 14 lines] > search on > ~$*.*;*.tmp Gharib - 24 Jun 2008 13:08 GMT This problem has been wearing me down for some time too, and I think I might have a clue to the cause. In my work, I have to edit a lot of Arabic Word documents; this of course requires a lot of gobal replacements. This problem has forced me to stop and restart Word many times. In my case, the search pattern could be any text, and I never had a special hyphen included in the search.
I believe the common pattern I found includes the following conditions:
1. "track changes" on 2. the string has been replaced successfully at least once before the attempt to do the global replacement 3. It follows from (2) above, that the search string exists in at least one of the tracking "baloons".
I only had the problem with Arabic documents, not with English ones. I also think that the above conditions are always true when the problem occurs, but this does not mean that whenever these conditions are true, the problem has to occur. It happens with some strings, not others. But if it happens with a certain string, it always happens with that string under the same conditions. If I edit the document without track changes, the problem does not happen. Unfortunately for me, track changes is a necessity.
My guess is that with track changes on and the string already being tracked because it was replaced once, Word seems to get into some time of pointer mess or get into a loop as if the search continues into the "search string instances" that are saved in the "tracked" data structures.
If this helps, please help by providing a workaround or an urgent fix.
Regards,
Alaa Zeineldine
> Hi Jay, > [quoted text clipped - 94 lines] > > I'd appreciate any input anyone can give!>> Neil Cumfer - 27 Jun 2008 22:14 GMT Hello,
I am not sure where this reply came from or how it got in this newsgroup, but I would like to offer some additional information on the problem.
I performed the 12 STEPS TO REPRODUCE as presented and obtained the behavior specified;
> > Documents containing conditional hyphens can cause Word to hang and consume > > 100% CPU when using the Find or Find & Replace command. However, there are other occasions when Word will hang when the Find & Replace dialog box is used.
This behavior started immediately after applying Service Pack 1 to Word 2007 on a computer running XP Professional with Service Pack 2.
I am trying to find ^p^w and replace it with ^p (effectively deleting white space after a paragraph mark).
Before applying Service Pack 1 to Word 2007, there was never a problem, but after applying the service pack, Word hangs if this is attempted in certain documents, even the same documents that had no problem with it before the service pack was applied. These are English language documents; track changes is off.
These documents do not contain conditional hyphens, so conditional hyphens isn't the whole story. The only thing special in these documents are some nonbreaking hyphens, page breaks, and an ellipsis. If these are removed, the Find and Replace dialog box still hangs. Also, there are some bullet lists, and the documents have been heavily edited and reused numerous times. There are 2 text boxes in the header, one contains text and the other contains an image.
I got the same hangup when starting Word in safe mode. None of the Search Options after 'More' are checked. The default document type is Word 2007; however, these are ".doc" files. (The same problem occurs if they are saved as ".docx" files and reopened.) Temp files have been deleted.
I hope these clues can help Microsoft patch their service pack.
The next day after running into this problem, I discovered that the VBA statement "ActiveDocument.Save" is no longer reliable either. On one document (different from the documents cited above), I got a VBA error message stating that the object's Method or Property (.Save) in not available because ... something to the effect that the document is not in Full Screen Reading View.
The next day I discovered that Microsoft crafted Service Pack 1 so that it could not be unistalled!
Happy weekend everybody
Neil
> This problem has been wearing me down for some time too, and I think I might > have a clue to the cause. In my work, I have to edit a lot of Arabic Word [quoted text clipped - 128 lines] > > > > I'd appreciate any input anyone can give!>> Klaus Linke - 01 Jul 2008 20:11 GMT I have the problem in a lot of files lately, too. Arabic language support is installed because some of the files need it.
I don't use "Track Changes", so it seems doubtful that it's necessary for the bug to hit. But I haven't found a way to build a reproducible case yet. The document format (docx, doc, rtf, xml...) also doesn't seem to be relevant.
A thing I noticed: If the cursor is in the same paragraph as the text you're searching for, "Find" or "Find/Replace" never seems to hang.
I have also run into other issues with Find/Replace lately. Say if I search for a character style, and the match occurs in a paragraph that's followed by a table, then the last character often isn't matched.
Don't know if the issues are related, but they appeared at about the same time, and seem to go away when I remove the Arabic language support.
Regards, Klaus
> This problem has been wearing me down for some time too, and I think I > might [quoted text clipped - 158 lines] >> >> I'd appreciate any input anyone can give!>> Klaus Linke - 02 Jul 2008 16:46 GMT After a bit more testing, I'm not sure any more whether BiDi language support has much to do with the problem. Tables don't seem to, either.
I stripped a doc that hang when using "Find" down as much as possible. I saved in Word2003 XML format.
Then I cut the optional hyphen that caused the problem, and pasted it in again. The problem went away ("Find" didn't hang any more).
I saved that "repaired" file, too.
If I cut the soft hyphen (either by itself, or with some more text following it) and then use "Undo", that fixes the problem for the moment, too. But if I close and re-open the file, the problem reappears.
Comparing the broken and repaired files, the only difference was in some rsid elements (revision save ids, such as w:rsidP="########"). They're expected since I "revised" the file, but apart from them, the files (especially the optional hyphen <w:softHyphen/>) looked the same.
Really weird...
Klaus
Neil Cumfer - 02 Jul 2008 22:34 GMT I don't think the problem is in the document at all. It worked fine before applying Service Pack 1. Locating the portion in the document where the bug strikes can help with creating a workaround.
> If I cut the soft hyphen (either by itself, or with some more text following > it) and then use "Undo", that fixes the problem for the moment, too. > But if I close and re-open the file, the problem reappears. I have seen something similar too.
When reproducing the bug as described in an earlier message ...
> STEPS TO REPRODUCE: > 1. Open the identified affected version of Word. > 2. (Optional for readability, does not affect test case) On the Home tab, in the Paragraph group, click Show/Hide to show formatting marks.
> 3. Type the word "Test" > 4. Press the Enter key [quoted text clipped - 4 lines] > 9. On the Home tab, in the Editing group, click Replace. > 10. For 'Find what', enter "Test", and for 'Replace with', enter "Testing"
> 11. Click Replace All. > 12. Observe that Word stops responding. Task Manager can be used to verify that Word is consuming as much CPU as possible (up to 100%)
... I noticed that I can copy the first conditional hyphen to the clipboard and paste it between the two consecutive conditional hyphens, then delete the first conditional hyphen, and suddenly the Replace All button will work without causing Word 2007 SP1 to freeze.
I have developed a workaround for my problem files. I have discovered that if I replace each space character with a space character, it will trick Service Pack 1 into letting me perform the replacement that otherwise would cause Word 2007 SP1 to freeze up. This workaround does not work for the document with the two conditional hyphens, however.
It appears to me that something in SP1 is causing the Find and Replace Dialog Box to become corrupted (or possibly something in SP1 is causing Word 2007 to corrupt some documents when it opens them).
Thanks again.
Neil
> After a bit more testing, I'm not sure any more whether BiDi language > support has much to do with the problem. [quoted text clipped - 21 lines] > > Klaus Klaus Linke - 03 Jul 2008 14:56 GMT Hi Neil,
Thanks for the info!
I was a bit obscure in my posts: Word often hangs for me even if there are no double optional hyphens (soft hyphens), only single ones. My work-around right now is to replace all of them with some other Unicode character, or delete them if possible.
When there's some time (next weekend?), I'll do some testing with your "STEPS TO REPRODUCE" and then try to file a bug report.
Thanks again, Klaus
>I don't think the problem is in the document at all. It worked fine > before applying Service Pack 1. Locating the portion in the document [quoted text clipped - 74 lines] >> >> Klaus Neil Cumfer - 07 Jul 2008 15:46 GMT OK, the "steps to reproduce" were posted a while back by somebody else, it seems that when some people follow the steps they can see the problem, but when other people follow the steps they can't.
> Hi Neil, > [quoted text clipped - 89 lines] > >> > >> Klaus Bob Buckland ?:-) - 06 Jul 2008 19:53 GMT Hi Neil,
FWIW, repeating the 'Steps to Reproduce', even with the unlikely document content <g>, Word 2007 SP1 doesn't hang for me on doing the replace.
It's possible that there's something in the documents that Word is 'seeing' that does this. Do you have webpage/blog/Office Live Workspace/file share site, etc that you can use to provide a link to a .docX document that you're seeing this in?
If you start Word 2007 in safe mode (hold ctrl key while starting Word and repeat the 'steps to reproduce' do you get the same hang?
One of the possibilities in the original messages in this thread is that it may be related to specific language settings or with a mix of Left-to-Right and Right-to-left languages being involved in a document.
What is the build level for Word 2007 (Alt, F, I, R)?
========= I don't think the problem is in the document at all. It worked fine before applying Service Pack 1. Locating the portion in the document where the bug strikes can help with creating a workaround.
> If I cut the soft hyphen (either by itself, or with some more text following
> it) and then use "Undo", that fixes the problem for the moment, too. > But if I close and re-open the file, the problem reappears. I have seen something similar too.
When reproducing the bug as described in an earlier message ...
> STEPS TO REPRODUCE: > 1. Open the identified affected version of Word. > 2. (Optional for readability, does not affect test case) On the Home tab, in the Paragraph group, click Show/Hide to show formatting marks.
> 3. Type the word "Test" > 4. Press the Enter key [quoted text clipped - 4 lines] > 9. On the Home tab, in the Editing group, click Replace. > 10. For 'Find what', enter "Test", and for 'Replace with', enter "Testing"
> 11. Click Replace All. > 12. Observe that Word stops responding. Task Manager can be used to verify that Word is consuming as much CPU as possible (up to 100%)
... I noticed that I can copy the first conditional hyphen to the clipboard and paste it between the two consecutive conditional hyphens, then delete the first conditional hyphen, and suddenly the Replace All button will work without causing Word 2007 SP1 to freeze.
I have developed a workaround for my problem files. I have discovered that if I replace each space character with a space character, it will trick Service Pack 1 into letting me perform the replacement that otherwise would cause Word 2007 SP1 to freeze up. This workaround does not work for the document with the two conditional hyphens, however.
It appears to me that something in SP1 is causing the Find and Replace Dialog Box to become corrupted (or possibly something in SP1 is causing Word 2007 to corrupt some documents when it opens them).
Thanks again.
Neil >>
 Signature
Bob Buckland ?:-) MS Office System Products MVP
*Courtesy is not expensive and can pay big dividends*
Neil Cumfer - 07 Jul 2008 15:27 GMT Hi Bob,
The problem started immediately after installing Service Pack 1 ... since it doesn't happen to everybody, it could be a faulty install, but Microsoft won't let you reinstall or uninstall the service pack. I have repaired the entire installation of Office 2007 to no avail.
Also, the problem manifests itself in safe mode.
I don't think the right-to-left languages are involved, my only enabled language is English (US).
In my mind, the problem is that the Find and Replace dialog box is in a corrupt state. The service pack attempted to fix many problems with various languages ... maybe a certain language has to be installed in order for the service pack to install correctly.
My build is Word 2007 (12.0.6212.1000) SP1 MSO (12.0.6213.1000) (hmm I see that the service pack is for 6213 but I have 6212)
You can download a .doc file from our website http://intranet.scstatehouse.net/reports/hupdate/hupdate.htm ... just about any link in the "2008 Issues" section (the May 6 issue is one of the shortest http://intranet.scstatehouse.net/reports/hupdate/8n17.doc).
These documents don't have hyphens but they do have paragraphs beginning with tabs and Word freezes (for me) when I try to replace ^p^w with ^p
Thanks for any help you can provide.
Neil
"Bob Buckland ?:-)" <75214.226(At Beautiful Downtown)compuserve.com> wrote in message news:#6npRm53IHA.3500@TK2MSFTNGP05.phx.gbl...
> Hi Neil, > [quoted text clipped - 66 lines] > > *Courtesy is not expensive and can pay big dividends* Bob Buckland ?:-) - 08 Jul 2008 15:14 GMT Hi Neil,
Yes, in those files I do get the issue. Word 2007 has trouble, going into a 100% CPU, use when the Replace dialog looks for two consecutive formatting code sequences, such as ^p^p or ^p^w
It can usually handle either of those separately but not the pair in some cases. That was the case here, http://www.scstatehouse.net/reports/hupdate/8n17.doc but so far none of the previous workarounds (i.e. replace ^p with ^& or first replacing ^p with text such as 'FRED', then do the ^p^w or FRED^w replace) has worked on that file, even when saved as XML, so I'm still looking at them and hopefully others might do so as well. :)
The dialog doesn't hang the system for me (i.e. while it won't respond to the mouse trying to close the dialog it does seem to respond to cancelling by the Esc key in most cases) and eventually the progress dialog on the bottom of the screen does start to creep forward.
================= Hi Bob,
The problem started immediately after installing Service Pack 1 ... since it doesn't happen to everybody, it could be a faulty install, but Microsoft won't let you reinstall or uninstall the service pack. I have repaired the entire installation of Office 2007 to no avail.
Also, the problem manifests itself in safe mode.
I don't think the right-to-left languages are involved, my only enabled language is English (US).
In my mind, the problem is that the Find and Replace dialog box is in a corrupt state. The service pack attempted to fix many problems with various languages ... maybe a certain language has to be installed in order for the service pack to install correctly.
My build is Word 2007 (12.0.6212.1000) SP1 MSO (12.0.6213.1000) (hmm I see that the service pack is for 6213 but I have 6212)
You can download a .doc file from our website http://intranet.scstatehouse.net/reports/hupdate/hupdate.htm ... just about any link in the "2008 Issues" section (the May 6 issue is one of the shortest http://intranet.scstatehouse.net/reports/hupdate/8n17.doc).
These documents don't have hyphens but they do have paragraphs beginning with tabs and Word freezes (for me) when I try to replace ^p^w with ^p
Thanks for any help you can provide.
Neil >>
 Signature
Bob Buckland ?:-) MS Office System Products MVP
*Courtesy is not expensive and can pay big dividends*
Neil Cumfer - 08 Jul 2008 16:55 GMT Hi Bob,
Thanks for fooling around with it.
As a workaround for this particular file, I can replace every space character in the document with another space (I use ^0032 in the find box and a space in the replace box). That seems to temporarily remove the corruption in the dialog box and can be followed by a successful replacement of ^p^w
I have also discovered that the escape key will restore order (might have to wait a couple of second), but if you click on the Cancel button or the X in the upper right corner, that title bar of the dialog box will change to Not Responding ... I guess the reports have been misleading because it is not actually Word that is hanging but the dialog box
I have been using ^p^w for years and never had a problem with it until Service Pack 1 for Word 2007
I think we might have explored this bug as far as anybody on the outside can go ... of course, all you readers are welcome to prove me wrong :-)
Neil
"Bob Buckland ?:-)" <75214.226(At Beautiful Downtown)compuserve.com> wrote in message news:e1hLDTQ4IHA.2332@TK2MSFTNGP03.phx.gbl...
> Hi Neil, > [quoted text clipped - 49 lines] > > *Courtesy is not expensive and can pay big dividends* Gharib - 09 Jul 2008 11:19 GMT Hello,
Thanks for the Esc suggestion. This seems to restore order, as you mentioned, and saves the huslte of restarting Word everytime.
I agree that my theory about track changes was not correct. There are also no particular patterns that are specific to the problem from what I can see, except perhaps Arabic files in the cases I have experienced. I do have a file where most attempts to search, even without replace, seems to end up in this endless loop. I will try to make this file available once I have my client's permission.
One observation I found, is that in some of the cases that did not hang, I found that after the completion of the search and replace, the file context did end up in the "track changes" pane, and a string was highlighted, this was one of the strins that were changed.
Regards,
Alaa Zeineldine
> Hi Neil, > [quoted text clipped - 43 lines] > > Neil >> Scott Beadenkopf - 23 Jul 2008 18:15 GMT I have been experiencing similar problems, also with Word 2007 SP1, also (12.0.6212.1000) SP1 MSO (12.0.6213.1000) , replacing " ^p" with "^p" (to remove the space preceeding the CR), even in a very simple text file.
On the "AllExperts" forum, Mahesh Khilare suggests searching for "^13" instead of "^p", but replacing with "^p". This solution worked for me.
I checked in a hex editor, to make sure that the "0D0A" (CRLF) was still "0D0A". I have not tested extensively, but the work around generally seems to work well.
> Hello, > [quoted text clipped - 64 lines] > > > > Neil >> Klaus Linke - 25 Jul 2008 11:54 GMT >I have been experiencing similar problems, also with Word 2007 SP1, also > (12.0.6212.1000) SP1 MSO (12.0.6213.1000) , replacing " ^p" with "^p" (to [quoted text clipped - 7 lines] > seems > to work well. That's a bug that has been around a while. It seems to hit in non-Word formats only (*.txt, WordPerfect...), so if you work on such docs and need to do replacements, it's best to save in Word format (*.doc, *.docx ...) first... Or use your work-around.
Klaus
Roger Noar - 23 Aug 2008 19:18 GMT Hi, I have the same problem with Word 2007 with the following search/replace. This codebelow works fine with Word 2000, and 2003. With Word 2007, it hangs with 100% CPU until Esc is pressed.
Apparently Word 2007 has a problem with certain complex searcges containing ^p . A simple ^p search works just fine. So my workaround was to first do a search/replace to replace all ^p with an identifier code - suchas "ZZ8" and then do a search/replace on ^lZZ8 instead of ^l^p .
Selection.HomeKey Unit:=wdStory Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^l^p" .Replacement.Text = "^l" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False End With Selection.Find.Execute Replace:=wdReplaceAll
Bob Buckland ?:-) - 27 Aug 2008 15:04 GMT Hi Roger,
Does the text you're searching include conditional hyphens or a mix of Left-to-Right and Right-to-Left languages?
If you change the direction of search from 'down' to 'up', manually or via your macro, does the 'hang' still occur?
If you phone Microsoft for this hotfix (no charge if you let them know you're calling for a hotfix) http://support.microsoft.com/kb/955587?FR=1 and install the hotfix, does the search still have the same problem?
================== Hi, I have the same problem with Word 2007 with the following search/replace. This codebelow works fine with Word 2000, and 2003. With Word 2007, it hangs with 100% CPU until Esc is pressed.
Apparently Word 2007 has a problem with certain complex searcges containing ^p . A simple ^p search works just fine. So my workaround was to first do a search/replace to replace all ^p with an identifier code - suchas "ZZ8" and then do a search/replace on ^lZZ8 instead of ^l^p .
Selection.HomeKey Unit:=wdStory Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^l^p" .Replacement.Text = "^l" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False End With Selection.Find.Execute Replace:=wdReplaceAll >>
 Signature
Bob Buckland ?:-) MS Office System Products MVP
*Courtesy is not expensive and can pay big dividends*
Neil Cumfer - 02 Jul 2008 22:11 GMT Thanks for investigating and responding.
> A thing I noticed: > If the cursor is in the same paragraph as the text you're searching for, > "Find" or "Find/Replace" never seems to hang. I would say "never: but yes, the Service Pack 1 bug is causing the Find and Replace Dialog Box to lose track of where it is in the document, at a certain point it keeps rechecking the same location and gets trapped in an endless loop. In some documents, you can watch the progress meter on the status bar and see the progress bar shrink and expand as the cursor keeps advancing and retreating during the replace all operation.
(I will also respond to your followup post)
> I have the problem in a lot of files lately, too. > Arabic language support is installed because some of the files need it. [quoted text clipped - 180 lines] > >> > >> I'd appreciate any input anyone can give!>> gilbar - 15 Jan 2008 14:43 GMT Jay, we're having simular problems with find & Replace. Our problems are happening when we try to find a string (like ~HE) that is on the end of a paragraph; so we look for ~HE^p When we do this, it cases hang Word, just like your problem. This happens mostly when we do it in a macro (Selection.Find.Execute FindText:="~HE^p"), but sometimes it hangs even when doing this manually. Hoping that the Powers that be fix this !
> I have been dealing with an interesting problem one of my users brought to me > which I believe has exposed a bug that has appeared in Word 2007 with SP1. [quoted text clipped - 83 lines] > > http://www.microsoft.com/office/community/en-us/default.mspx?mid=7d3bb66a-0cee-4 423-a9de-5aa5a03da499&dg=microsoft.public.word.application.errors stiller41 - 31 Jan 2008 11:30 GMT I too had that problem and found a workaround.
1. In Windows explorer, call up the document/ 2. Save the document as a Word 97-2003 file and close it. 3. Close the Windows Explorer dialogue box/ 4. Re-open Windows Explorer and re-open the document.
Find & Replace should now work without hanging.
That worked for me.
andy g.
> Jay, we're having simular problems with find & Replace. Our problems are > happening when we try to find a string (like ~HE) that is on the end of a [quoted text clipped - 91 lines] > > > > http://www.microsoft.com/office/community/en-us/default.mspx?mid=7d3bb66a-0cee-4 423-a9de-5aa5a03da499&dg=microsoft.public.word.application.errors jh - 23 Mar 2008 23:04 GMT Hi!
I justed wanted say that for me, this "Windows Explorer" trick didn't make sense (that's just the .doc trick) and also it did not fix the problem for me. However, I could save as Other Formats -> Word XML Document (.xml), and using that, the Find crash didn't occur anymore!
I could also save back to .docx and still have no problems. Also I could retain all links, images, formatting and so on.
Good luck!
jh - 27 Mar 2008 16:01 GMT Now, after a couple of days, I have to say that unfortunately my workaround doesn't work for me any more. I can't use Find in my document, it will result in a crash. It doesn't help for me any more if I save at other formats. It will crash anway.
By the way, this problem is only with the SP1 version. It's fine in the original version. And there is also another bug (on both versions): text jumps around occasionally during the automatic rewrap while writing so, that the screen is not updated properly. This results in a total mess; cursor is not really where it seems to be (or the text is not as it seems).
jh - 27 Mar 2008 22:33 GMT Ok, I think I finally found a working workaround.
Word Options -> Display -> Always show.. -> [v] Optional hyphens (or you can put Show all formatting marks if you want)
Then, find in the document the place where you have multiple (at least two) hyphen marks consecutively (¬¬) and delete those. Without those, the Find function will work properly.
vandusenc - 02 Apr 2008 21:32 GMT I have been having this problem as well, and thanks to these posts, now I know what the problem is.
In addition to jh's reply below, I found that if the formatting (font, style, size, colours and whatnot...) are not an issue, simply saving the file as text only, closing, and openning the document again gets rid of any offending characters.
> Ok, I think I finally found a working workaround. > [quoted text clipped - 4 lines] > hyphen marks consecutively (¬¬) and delete those. Without those, the Find > function will work properly. Bob Buckland ?:-) - 03 Apr 2008 01:25 GMT Hi Vandusenc,
When saving as plain text and reopening do you still have two hyphens?
If you save as the document to XML and reopen rather than as text do you still get the error?
========= I have been having this problem as well, and thanks to these posts, now I know what the problem is.
In addition to jh's reply below, I found that if the formatting (font, style, size, colours and whatnot...) are not an issue, simply saving the file as text only, closing, and openning the document again gets rid of any offending characters. >>
 Signature
Bob Buckland ?:-) MS Office System Products MVP
*Courtesy is not expensive and can pay big dividends*
sjc - 03 Apr 2008 21:06 GMT Thank you JH!! This issue has been plaguing me and your solution worked. To quickly find those problematic hyphens, select the "more>>" button in the find/replace window, then click the "special" and select "Optional Hyphen", then click the "find next" button.
> Ok, I think I finally found a working workaround. > [quoted text clipped - 4 lines] > hyphen marks consecutively (¬¬) and delete those. Without those, the Find > function will work properly. ketabkhaneh - 04 Apr 2008 20:22 GMT Dear Sjc
I did your comment but clicking the FIND NEXT caused the WORD to be hanged
> Thank you JH!! This issue has been plaguing me and your solution worked. To > quickly find those problematic hyphens, select the "more>>" button in the [quoted text clipped - 10 lines] > > hyphen marks consecutively (¬¬) and delete those. Without those, the Find > > function will work properly. danezeq - 27 Apr 2008 19:31 GMT i searched for hyphen marks (¬¬) in my documents and it didn't find any. STILL my word stuck in Find&Replace (and in Find to)
these 2 documents contain english and hebrew.
what shall i do?
Bob Buckland ?:-) - 27 Apr 2008 19:35 GMT Hi Danezeq,
Are you using Word 2007 SP1 as mentioned in the subject line? What was the specific search parameters you were using? Was the document created in Word 2007 originally?
============== i searched for hyphen marks (¬¬) in my documents and it didn't find any. STILL my word stuck in Find&Replace (and in Find to)
these 2 documents contain english and hebrew.
what shall i do?>>
 Signature
Bob Buckland ?:-) MS Office System Products MVP
*Courtesy is not expensive and can pay big dividends*
ketabkhaneh - 02 May 2008 09:59 GMT Dear Bob
Hi,
Does Microsoft propose a solution or an update for this problem?
Please guide me how can I remove the problem. Since the problem is very often occur in my files it actually stops my working.
Look forward to hearing from you. Regards
Ketabkhaneh
> Hi Danezeq, > [quoted text clipped - 9 lines] > > what shall i do?>> danezeq - 18 May 2008 11:38 GMT - Yes. im using Word 2007 SP1. - I search for a word in hebrew "הסכמה" but i think it can happen also in english. (and not merely this particular word) - Yes i created the document in 2007 (or 2003)
> Hi Danezeq, > [quoted text clipped - 9 lines] > > what shall i do?>>
|
|
|