Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Problem with function "Find and Replace" in Word.
Hi,
I build a macro to auto "Find and replace" text in a document. In Word 2000, it works very well. The problem is when i try to run the same macro in Word 2003. Actually it still working , but the problem is for each "Find and replace" action the program will ask: do you want to go further will the find action and there is two text find and replace ......etc. My question is, is there a option in Word 2003 that you can turn off the question? Thanks and Regards, P.Law |
#2
|
|||
|
|||
Hi Pat,
Look in your macro code. If the .Wrap property of the .Find object is set to wdFindAsk, that's the cause of the question. Change it according to the behavior you want: wdFindContinue makes the search continue beyond the end of the original selection or range (or wrap around to the beginning of the document), or wdFindStop makes the search stop immediately. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Pat wrote: Hi, I build a macro to auto "Find and replace" text in a document. In Word 2000, it works very well. The problem is when i try to run the same macro in Word 2003. Actually it still working , but the problem is for each "Find and replace" action the program will ask: do you want to go further will the find action and there is two text find and replace ......etc. My question is, is there a option in Word 2003 that you can turn off the question? Thanks and Regards, P.Law |
#3
|
|||
|
|||
Hi Jay,
Thanks for your help it seems be worked now. Another question the ".Wrap" property, does it also be support by Word 2000. When i try to set this property "Wrap" = wdFindAsk. And run the macro, it will automatisch find and replace the text without asking any question. Best regards, Patrick "Jay Freedman" wrote: Hi Pat, Look in your macro code. If the .Wrap property of the .Find object is set to wdFindAsk, that's the cause of the question. Change it according to the behavior you want: wdFindContinue makes the search continue beyond the end of the original selection or range (or wrap around to the beginning of the document), or wdFindStop makes the search stop immediately. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Pat wrote: Hi, I build a macro to auto "Find and replace" text in a document. In Word 2000, it works very well. The problem is when i try to run the same macro in Word 2003. Actually it still working , but the problem is for each "Find and replace" action the program will ask: do you want to go further will the find action and there is two text find and replace ......etc. My question is, is there a option in Word 2003 that you can turn off the question? Thanks and Regards, P.Law |
#4
|
|||
|
|||
Hi Pat,
Yes, wdFindAsk does work in Word 2000. Whether or not the prompt appears depends on how the replacement is set up -- if you tell it to search the whole document, then there's nothing to ask about. That happens when you're using Selection.Find and the Selection (the cursor) starts at the beginning of the document, or if the whole document is selected; or if you're using the .Find of a Range object that's initialized to ActiveDocument.Range. If you have any more questions of this sort, I'd suggest that you move over to one of the programming/VBA newsgroups. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org On Wed, 16 Mar 2005 03:33:02 -0800, Pat wrote: Hi Jay, Thanks for your help it seems be worked now. Another question the ".Wrap" property, does it also be support by Word 2000. When i try to set this property "Wrap" = wdFindAsk. And run the macro, it will automatisch find and replace the text without asking any question. Best regards, Patrick "Jay Freedman" wrote: Hi Pat, Look in your macro code. If the .Wrap property of the .Find object is set to wdFindAsk, that's the cause of the question. Change it according to the behavior you want: wdFindContinue makes the search continue beyond the end of the original selection or range (or wrap around to the beginning of the document), or wdFindStop makes the search stop immediately. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Pat wrote: Hi, I build a macro to auto "Find and replace" text in a document. In Word 2000, it works very well. The problem is when i try to run the same macro in Word 2003. Actually it still working , but the problem is for each "Find and replace" action the program will ask: do you want to go further will the find action and there is two text find and replace ......etc. My question is, is there a option in Word 2003 that you can turn off the question? Thanks and Regards, P.Law |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word Find & Replace | Microsoft Word Help | |||
How do I find and replace a superscript number in a word? | Microsoft Word Help | |||
Find and Replace Locks Up Word | Formatting Long Documents | |||
Find and Replace Locks Up Word | Microsoft Word Help | |||
Find and Replace anomaly | Microsoft Word Help |