Help!

Find/replace behaves differently with Track Changes on

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Application Errors RSS
Next:  restoring contact and email data from backup afte..  
Author Message
gingerpeach123
External


Since: Aug 27, 2009
Posts: 4



PostPosted: Thu Aug 27, 2009 9:46 am    Post subject: Find/replace behaves differently with Track Changes on
Archived from groups: microsoft>public>word>application>errors (more info?)

Some time ago, I recorded a macro to help me remove incorrectly placed
paragraph marks that arise when I paste text from PDF files into Word. (For
example, the phrase "good day" appears as "good[paragraphmark]day" if the
word "good" come at the end of a line; my macro uses find/replace to fix
this.) I just noticed that the macro does not work correctly when I have
Track Changes on.

With Track Changes off, "good[paragraphmark]day" is correctly converted to
"good day."

With Track Changes on, "good[paragraphmark]day" is converted to "goodd ay,"
with the space shifted over from where it should be.

The same thing seems to happen when I use the Find/Replace function
directly, rather than the macro. It also occurs when I type out a new test
document, so it does not seem to be related to the fact that I copied the
text from a .pdf file.

For now I'm OK because I don't absolutely need Track Changes on when I do
the find/replace, but I can imagine that sometime I will want to have it on.
Any idea what is going on?

Thanks!

P.S. I'm running Word 2007 and Vista
Back to top
Herb Tyson [MVP]
External


Since: Oct 02, 2003
Posts: 2144



PostPosted: Thu Aug 27, 2009 3:26 pm    Post subject: Re: Find/replace behaves differently with Track Changes on [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm not seeing that behavior here. Maybe I'm not doing exactly what you're
doing, though. I have:

He had a good[paragraph]
day.

Find what:good^day

Replace with:good day

The resulting change has "good[paragraph]day" with strikethrough, and "good
day" underlined as the correctly inserted text.

--

Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


"gingerpeach123" <gingerpeach123 RemoveThis @discussions.microsoft.com> wrote in message
news:6AD3B7BD-9F13-49C4-9390-9640B3005995@microsoft.com...
> Some time ago, I recorded a macro to help me remove incorrectly placed
> paragraph marks that arise when I paste text from PDF files into Word.
> (For
> example, the phrase "good day" appears as "good[paragraphmark]day" if the
> word "good" come at the end of a line; my macro uses find/replace to fix
> this.) I just noticed that the macro does not work correctly when I have
> Track Changes on.
>
> With Track Changes off, "good[paragraphmark]day" is correctly converted to
> "good day."
>
> With Track Changes on, "good[paragraphmark]day" is converted to "goodd
> ay,"
> with the space shifted over from where it should be.
>
> The same thing seems to happen when I use the Find/Replace function
> directly, rather than the macro. It also occurs when I type out a new test
> document, so it does not seem to be related to the fact that I copied the
> text from a .pdf file.
>
> For now I'm OK because I don't absolutely need Track Changes on when I do
> the find/replace, but I can imagine that sometime I will want to have it
> on.
> Any idea what is going on?
>
> Thanks!
>
> P.S. I'm running Word 2007 and Vista
Back to top
gingerpeach123
External


Since: Aug 27, 2009
Posts: 4



PostPosted: Sat Aug 29, 2009 12:38 pm    Post subject: Re: Find/replace behaves differently with Track Changes on [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi, Herb,

Thanks for checking on this. I had used the "good day" text just as an
example; my actual Find/Replace was done using wildcards (specifically, the
find string was "^013([a-z])", to be replaced with " \1").

Since I first started asking around about this problem, several colleagues
have told me that Track Changes and wildcards don't mix; if you want a
Find/Replace with wildcards to run correctly, Track Changes has to be off.

So I have an explanation for the behavior I was seeing, though I'd certainly
prefer it if one could use wildcards to run a search and use Track Changes to
view the results! If you know of a way to accomplish this, please let me know.

Thanks again,

gingerpeach123
================



"Herb Tyson [MVP]" wrote:

> I'm not seeing that behavior here. Maybe I'm not doing exactly what you're
> doing, though. I have:
>
> He had a good[paragraph]
> day.
>
> Find what:good^day
>
> Replace with:good day
>
> The resulting change has "good[paragraph]day" with strikethrough, and "good
> day" underlined as the correctly inserted text.
>
> --
>
> Herb Tyson MS MVP
> Author of the Word 2007 Bible
> Blog: http://word2007bible.herbtyson.com
> Web: http://www.herbtyson.com
>
>
> "gingerpeach123" <gingerpeach123.DeleteThis@discussions.microsoft.com> wrote in message
> news:6AD3B7BD-9F13-49C4-9390-9640B3005995@microsoft.com...
> > Some time ago, I recorded a macro to help me remove incorrectly placed
> > paragraph marks that arise when I paste text from PDF files into Word.
> > (For
> > example, the phrase "good day" appears as "good[paragraphmark]day" if the
> > word "good" come at the end of a line; my macro uses find/replace to fix
> > this.) I just noticed that the macro does not work correctly when I have
> > Track Changes on.
> >
> > With Track Changes off, "good[paragraphmark]day" is correctly converted to
> > "good day."
> >
> > With Track Changes on, "good[paragraphmark]day" is converted to "goodd
> > ay,"
> > with the space shifted over from where it should be.
> >
> > The same thing seems to happen when I use the Find/Replace function
> > directly, rather than the macro. It also occurs when I type out a new test
> > document, so it does not seem to be related to the fact that I copied the
> > text from a .pdf file.
> >
> > For now I'm OK because I don't absolutely need Track Changes on when I do
> > the find/replace, but I can imagine that sometime I will want to have it
> > on.
> > Any idea what is going on?
> >
> > Thanks!
> >
> > P.S. I'm running Word 2007 and Vista
>
>
Back to top
Herb Tyson [MVP]
External


Since: Oct 02, 2003
Posts: 2144



PostPosted: Sat Aug 29, 2009 5:31 pm    Post subject: Re: Find/replace behaves differently with Track Changes on [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The following might work:

Find what:^013([a-z]{1,20})(*)(^32)
Replace with:\3\1\2\3

Basically, I expand the search so that it can match any word (all lowercase)
that contains from 1 to 20 letters. I then include a token for anything that
follows (since not all words are immediately followed by a space), and then
a token for the next space that occurs after the word. I then borrow that
found space and use IT rather than an actual space to create the space that
Word seems intent upon putting in the wrong place.

It worked in all scenarios for which I tested it EXCEPT when the found word
has no space after it through the end of the document. Also, if you expect
to have any words longer than 20 characters, change the 20 to something
higher.

--

Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


"gingerpeach123" <gingerpeach123 RemoveThis @discussions.microsoft.com> wrote in message
news:BCA725FF-54AF-4160-A6B4-E9804295B231@microsoft.com...
> Hi, Herb,
>
> Thanks for checking on this. I had used the "good day" text just as an
> example; my actual Find/Replace was done using wildcards (specifically,
> the
> find string was "^013([a-z])", to be replaced with " \1").
>
> Since I first started asking around about this problem, several colleagues
> have told me that Track Changes and wildcards don't mix; if you want a
> Find/Replace with wildcards to run correctly, Track Changes has to be off.
>
> So I have an explanation for the behavior I was seeing, though I'd
> certainly
> prefer it if one could use wildcards to run a search and use Track Changes
> to
> view the results! If you know of a way to accomplish this, please let me
> know.
>
> Thanks again,
>
> gingerpeach123
> ================
>
>
>
> "Herb Tyson [MVP]" wrote:
>
>> I'm not seeing that behavior here. Maybe I'm not doing exactly what
>> you're
>> doing, though. I have:
>>
>> He had a good[paragraph]
>> day.
>>
>> Find what:good^day
>>
>> Replace with:good day
>>
>> The resulting change has "good[paragraph]day" with strikethrough, and
>> "good
>> day" underlined as the correctly inserted text.
>>
>> --
>>
>> Herb Tyson MS MVP
>> Author of the Word 2007 Bible
>> Blog: http://word2007bible.herbtyson.com
>> Web: http://www.herbtyson.com
>>
>>
>> "gingerpeach123" <gingerpeach123 RemoveThis @discussions.microsoft.com> wrote in
>> message
>> news:6AD3B7BD-9F13-49C4-9390-9640B3005995@microsoft.com...
>> > Some time ago, I recorded a macro to help me remove incorrectly placed
>> > paragraph marks that arise when I paste text from PDF files into Word.
>> > (For
>> > example, the phrase "good day" appears as "good[paragraphmark]day" if
>> > the
>> > word "good" come at the end of a line; my macro uses find/replace to
>> > fix
>> > this.) I just noticed that the macro does not work correctly when I
>> > have
>> > Track Changes on.
>> >
>> > With Track Changes off, "good[paragraphmark]day" is correctly converted
>> > to
>> > "good day."
>> >
>> > With Track Changes on, "good[paragraphmark]day" is converted to "goodd
>> > ay,"
>> > with the space shifted over from where it should be.
>> >
>> > The same thing seems to happen when I use the Find/Replace function
>> > directly, rather than the macro. It also occurs when I type out a new
>> > test
>> > document, so it does not seem to be related to the fact that I copied
>> > the
>> > text from a .pdf file.
>> >
>> > For now I'm OK because I don't absolutely need Track Changes on when I
>> > do
>> > the find/replace, but I can imagine that sometime I will want to have
>> > it
>> > on.
>> > Any idea what is going on?
>> >
>> > Thanks!
>> >
>> > P.S. I'm running Word 2007 and Vista
>>
>>
Back to top
gingerpeach123
External


Since: Aug 27, 2009
Posts: 4



PostPosted: Sat Sep 19, 2009 6:53 pm    Post subject: Re: Find/replace behaves differently with Track Changes on [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thank you for taking the time to work through this! I'll give it a try.

gingerpeach123

"Herb Tyson [MVP]" wrote:

> The following might work:
>
> Find what:^013([a-z]{1,20})(*)(^32)
> Replace with:\3\1\2\3
>
> Basically, I expand the search so that it can match any word (all lowercase)
> that contains from 1 to 20 letters. I then include a token for anything that
> follows (since not all words are immediately followed by a space), and then
> a token for the next space that occurs after the word. I then borrow that
> found space and use IT rather than an actual space to create the space that
> Word seems intent upon putting in the wrong place.
>
> It worked in all scenarios for which I tested it EXCEPT when the found word
> has no space after it through the end of the document. Also, if you expect
> to have any words longer than 20 characters, change the 20 to something
> higher.
>
> --
>
> Herb Tyson MS MVP
> Author of the Word 2007 Bible
> Blog: http://word2007bible.herbtyson.com
> Web: http://www.herbtyson.com
>
>
> "gingerpeach123" <gingerpeach123.DeleteThis@discussions.microsoft.com> wrote in message
> news:BCA725FF-54AF-4160-A6B4-E9804295B231@microsoft.com...
> > Hi, Herb,
> >
> > Thanks for checking on this. I had used the "good day" text just as an
> > example; my actual Find/Replace was done using wildcards (specifically,
> > the
> > find string was "^013([a-z])", to be replaced with " \1").
> >
> > Since I first started asking around about this problem, several colleagues
> > have told me that Track Changes and wildcards don't mix; if you want a
> > Find/Replace with wildcards to run correctly, Track Changes has to be off.
> >
> > So I have an explanation for the behavior I was seeing, though I'd
> > certainly
> > prefer it if one could use wildcards to run a search and use Track Changes
> > to
> > view the results! If you know of a way to accomplish this, please let me
> > know.
> >
> > Thanks again,
> >
> > gingerpeach123
> > ================
> >
> >
> >
> > "Herb Tyson [MVP]" wrote:
> >
> >> I'm not seeing that behavior here. Maybe I'm not doing exactly what
> >> you're
> >> doing, though. I have:
> >>
> >> He had a good[paragraph]
> >> day.
> >>
> >> Find what:good^day
> >>
> >> Replace with:good day
> >>
> >> The resulting change has "good[paragraph]day" with strikethrough, and
> >> "good
> >> day" underlined as the correctly inserted text.
> >>
> >> --
> >>
> >> Herb Tyson MS MVP
> >> Author of the Word 2007 Bible
> >> Blog: http://word2007bible.herbtyson.com
> >> Web: http://www.herbtyson.com
> >>
> >>
> >> "gingerpeach123" <gingerpeach123.DeleteThis@discussions.microsoft.com> wrote in
> >> message
> >> news:6AD3B7BD-9F13-49C4-9390-9640B3005995@microsoft.com...
> >> > Some time ago, I recorded a macro to help me remove incorrectly placed
> >> > paragraph marks that arise when I paste text from PDF files into Word.
> >> > (For
> >> > example, the phrase "good day" appears as "good[paragraphmark]day" if
> >> > the
> >> > word "good" come at the end of a line; my macro uses find/replace to
> >> > fix
> >> > this.) I just noticed that the macro does not work correctly when I
> >> > have
> >> > Track Changes on.
> >> >
> >> > With Track Changes off, "good[paragraphmark]day" is correctly converted
> >> > to
> >> > "good day."
> >> >
> >> > With Track Changes on, "good[paragraphmark]day" is converted to "goodd
> >> > ay,"
> >> > with the space shifted over from where it should be.
> >> >
> >> > The same thing seems to happen when I use the Find/Replace function
> >> > directly, rather than the macro. It also occurs when I type out a new
> >> > test
> >> > document, so it does not seem to be related to the fact that I copied
> >> > the
> >> > text from a .pdf file.
> >> >
> >> > For now I'm OK because I don't absolutely need Track Changes on when I
> >> > do
> >> > the find/replace, but I can imagine that sometime I will want to have
> >> > it
> >> > on.
> >> > Any idea what is going on?
> >> >
> >> > Thanks!
> >> >
> >> > P.S. I'm running Word 2007 and Vista
> >>
> >>
>
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Application Errors All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum