Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
 
Posts: n/a
Default Word Bug: Find/Replace wildcards while track changes is turned on is buggy

A user I work with has found an unusual bug in Microsoft Word, and I'm
wondering if there is a fix for it that ya'll know about. Here's the
scenario. It only is a problem when he has Tracking Changes turned on:
the find and replace works fine when Tracking Changes is off.

I've got some text in a document, that includes ..."claim 1"...
(although the number could be replaced with any other string of
characters, where the first character is a digit, in the example search
and replace I am performing, the number has to be exactly 1 digit
long). I want to put a flag character before and after the string
beginning with the number. I search for the following string in the
Find and Replace dialog box: "([Cc][Ll][Aa][Ii][Mm] )([0-9])", with
wildcards activated. This search performs perfectly. I then replace
it with the following string: "\1#\2#". What this should do is delete
the text "claim 1" from the document and insert "claim #1#" instead.
(Microsoft Word probably has some formula that dictates where the
inserted text is put relative to the deleted text, but I can't figure
out the pattern: it appears to be all over the map. What should
definitely hold true, though, is that if I were to accept both the
deletion and insertion, I would end up with pound signs before and
after the number string. And ideally, the deletion and insertion would
be done in blocks: all deleted characters together, and all inserted
characters together.) But what actually happens is that the characters
are inserted out of order, and in such a way as to make the replacement
worthless for future use. Here is what comes out (with bolded
characters representing the deleted characters, and underscores the
inserted characters):

claim c1laim 1##

I can replace the pound signs in the replace string with anything I
want, the result is the same (except that where the number is inserted
into the deleted word "claim" depends on the length of the string I was
putting before the number.

The problem definitely relates to the use of wildcards: specifically,
the use of the "Find what expression" in the Replace string (that is,
the \1, \2, etc). I know this because if I were to search for
"([Cc][Ll][Aa][Ii][Mm] )1" and replace it with \1#1#, the text "claim
" is inserted before the deleted text, whereas the "#1#" is inserted
after the deleted text. And if I were to do a find and replace without
any "Find what expressions", all of the original text is deleted first,
then all of the replacement text is inserted. But since I need to do
this from within a macro, I have to use the "Find what expression" to
do the search and replace.

Any ideas?

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default Word Bug: Find/Replace wildcards while track changes is turned on is buggy

I tried this (Word 2003) and can't replicate the problem.


wrote in message
oups.com...
A user I work with has found an unusual bug in Microsoft Word, and I'm
wondering if there is a fix for it that ya'll know about. Here's the
scenario. It only is a problem when he has Tracking Changes turned on:
the find and replace works fine when Tracking Changes is off.

I've got some text in a document, that includes ..."claim 1"...
(although the number could be replaced with any other string of
characters, where the first character is a digit, in the example search
and replace I am performing, the number has to be exactly 1 digit
long). I want to put a flag character before and after the string
beginning with the number. I search for the following string in the
Find and Replace dialog box: "([Cc][Ll][Aa][Ii][Mm] )([0-9])", with
wildcards activated. This search performs perfectly. I then replace
it with the following string: "\1#\2#". What this should do is delete
the text "claim 1" from the document and insert "claim #1#" instead.
(Microsoft Word probably has some formula that dictates where the
inserted text is put relative to the deleted text, but I can't figure
out the pattern: it appears to be all over the map. What should
definitely hold true, though, is that if I were to accept both the
deletion and insertion, I would end up with pound signs before and
after the number string. And ideally, the deletion and insertion would
be done in blocks: all deleted characters together, and all inserted
characters together.) But what actually happens is that the characters
are inserted out of order, and in such a way as to make the replacement
worthless for future use. Here is what comes out (with bolded
characters representing the deleted characters, and underscores the
inserted characters):

claim c1laim 1##

I can replace the pound signs in the replace string with anything I
want, the result is the same (except that where the number is inserted
into the deleted word "claim" depends on the length of the string I was
putting before the number.

The problem definitely relates to the use of wildcards: specifically,
the use of the "Find what expression" in the Replace string (that is,
the \1, \2, etc). I know this because if I were to search for
"([Cc][Ll][Aa][Ii][Mm] )1" and replace it with \1#1#, the text "claim
" is inserted before the deleted text, whereas the "#1#" is inserted
after the deleted text. And if I were to do a find and replace without
any "Find what expressions", all of the original text is deleted first,
then all of the replacement text is inserted. But since I need to do
this from within a macro, I have to use the "Find what expression" to
do the search and replace.

Any ideas?

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Tony Jollans
 
Posts: n/a
Default Word Bug: Find/Replace wildcards while track changes is turned on is buggy

Interesting but no help I'm afraid.

Yes, I see this in Word 2003 (with no service packs); it happens with very
simple searches - the \n replacement seems to be put before whatever should
be before it. I can't explain it and can't offer any way round it either.

--
Enjoy,
Tony


wrote in message
oups.com...
A user I work with has found an unusual bug in Microsoft Word, and I'm
wondering if there is a fix for it that ya'll know about. Here's the
scenario. It only is a problem when he has Tracking Changes turned on:
the find and replace works fine when Tracking Changes is off.

I've got some text in a document, that includes ..."claim 1"...
(although the number could be replaced with any other string of
characters, where the first character is a digit, in the example search
and replace I am performing, the number has to be exactly 1 digit
long). I want to put a flag character before and after the string
beginning with the number. I search for the following string in the
Find and Replace dialog box: "([Cc][Ll][Aa][Ii][Mm] )([0-9])", with
wildcards activated. This search performs perfectly. I then replace
it with the following string: "\1#\2#". What this should do is delete
the text "claim 1" from the document and insert "claim #1#" instead.
(Microsoft Word probably has some formula that dictates where the
inserted text is put relative to the deleted text, but I can't figure
out the pattern: it appears to be all over the map. What should
definitely hold true, though, is that if I were to accept both the
deletion and insertion, I would end up with pound signs before and
after the number string. And ideally, the deletion and insertion would
be done in blocks: all deleted characters together, and all inserted
characters together.) But what actually happens is that the characters
are inserted out of order, and in such a way as to make the replacement
worthless for future use. Here is what comes out (with bolded
characters representing the deleted characters, and underscores the
inserted characters):

claim c1laim 1##

I can replace the pound signs in the replace string with anything I
want, the result is the same (except that where the number is inserted
into the deleted word "claim" depends on the length of the string I was
putting before the number.

The problem definitely relates to the use of wildcards: specifically,
the use of the "Find what expression" in the Replace string (that is,
the \1, \2, etc). I know this because if I were to search for
"([Cc][Ll][Aa][Ii][Mm] )1" and replace it with \1#1#, the text "claim
" is inserted before the deleted text, whereas the "#1#" is inserted
after the deleted text. And if I were to do a find and replace without
any "Find what expressions", all of the original text is deleted first,
then all of the replacement text is inserted. But since I need to do
this from within a macro, I have to use the "Find what expression" to
do the search and replace.

Any ideas?

Thanks in advance.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill-in field prompts Deb McLellan New Users 7 March 13th 06 08:43 PM
WP merge file to Word sstires Tables 4 February 14th 06 06:26 PM
How can Word display full path of a file in the title bar? SAsif Microsoft Word Help 1 January 26th 06 04:32 PM
Does Word have a QuickCorrect/Quick Word option like WordPerfect? CW New Users 2 December 20th 05 05:54 PM
In Word, how do I surpress headers and footers on page 2 Bill Microsoft Word Help 1 December 15th 05 06:13 PM


All times are GMT +1. The time now is 09:10 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"