find/replace in between text

  • Thread starter Thread starter abelp1975
  • Start date Start date
A

abelp1975

Hello you All:
I have several lines of text I need to replace for the same in bold.
I have something like this: GO some text GOAGAIN
I need to transform "some text" to "some text" in bold and clean "GO"
and "GOAGAIN".
How to do that?

Thank you all in advanced.
Abel.
 
If by clean you mean remove then you should be able to use Find and Replace

Find GO(?{1,})GOAGAIN
Replace \1
Replace format Bold
Check Use Wildcards
 
but how do I apply those commands? Is that to be applied to a macro?
something like this:
Sub Macro1()
'
' Macro1 Macro
' Macro gravada 29-11-2005 por Abel Mateus Reis Pinto
'
With Selection.Find
.Text = "<b>" & "(a)([0-9]{1,})(a)" & "</b>"
.Replacement.Text = "exchange"
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True
End With

End Sub

but this doesnt work!
why?
Thank you once again
Abel.
 
Well, yes, _something_ like that, but that doesn't have a whole lot to do
with the original question so what is it that you are actually wanting to
do? Can you give a little bit more detail of the format of your data and the
actual strings you want to find and replace?
 

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