Can't get rid of replace text in the "Replace with"

  • Thread starter Thread starter livetohike
  • Start date Start date
L

livetohike

Word 2000

After many years of use, all of a sudden there is some replace text
'stuck' in the Replace with field. I delete it and it comes back some
time latter. For what its worth the text is: \1^032\2 (Which I
probably used at some point in the past.
Thanks
 
livetohike said:
Word 2000

After many years of use, all of a sudden there is some replace text
'stuck' in the Replace with field. I delete it and it comes back some
time latter. For what its worth the text is: \1^032\2 (Which I
probably used at some point in the past.
Thanks

Do you use some macro that might do a wildcard replacement?
The macro could be re-written so it does not mess with the Find dialog...
either by re-setting the replacement text when it's finished, or by using
Range.Find instead of Selection.Find.

Regards,
Klaus
 
Do you use some macro that might do a wildcard replacement?
The macro could be re-written so it does not mess with the Find dialog...
either by re-setting the replacement text when it's finished, or by using
Range.Find instead of Selection.Find.

Regards,
Klaus


Yes, that was it! I don't know what Range.Find is so I added the two
lines at the bottom of the macro.

Thanks.

Sub ConvertWrap()
With Selection.Find
.Text = "([!^013])^013([!^013^t])"
.Replacement.Text = "\1^032\2"
.Forward = True
'.Wrap = wdFindContinue
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
.Execute Replace:=wdReplaceAll

'I added these two lines
.Text = ""
.Replacement.Text = ""
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top