Find percent replace with backspace%

A

AJ

I am currently using Word 2000 with Dragon Naturally
Speaking dictation software.

Our correspondense uses various percentage figures within
each document. For example 15%, 25.5% 17.5%, etc. You
get the picture. However, the dictation spells out % as
percent. So now I have a number space percent. What I
want is number no space %sign.

I want to use Fiind and Replace to locate the
<space>percent and replace with <backspace>% so that it
eliminates the space between the number and % sign.

Thought after creating the correct Find and Replace option
that I would then make it a macro/macro button. I would
like to have the macro search all instances of
number<space>percent and replaces with number<no space>%.
Since the number is never the same number it makes this
process more difficult.

I cannot find a code or field of any type that will work
in the replace box that will remove that space and place
the %sign immediately after the number.

Any ideas?
 
G

Greg

AJ

Edit>Replace>More>Use wildcards

Typein find what: ([0-9]{1,}) percent
Type in replace with: \1%
 
G

Greg

Here is a macro:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded June 17, 2004 by CDR Gregory K. Maxey
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([0-9]{1,}) percent"
.Replacement.Text = "\1%"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
 
S

Suzanne S. Barnhill

You don't need a macro or a backspace. Just replace " percent" (note the
space) with "%" (without the quotation marks). I do this all the time.
 

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

Top