Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
 
Posts: n/a
Default find/replace in between text

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.

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Tony Jollans
 
Posts: n/a
Default find/replace in between text

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

--
Enjoy,
Tony


wrote in message
ups.com...
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.



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
 
Posts: n/a
Default find/replace in between text

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.

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Tony Jollans
 
Posts: n/a
Default find/replace in between text

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?

--
Enjoy,
Tony


wrote in message
ups.com...
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.



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
Header with picture or text box Scott Page Layout 15 April 28th 23 02:52 AM
Creating dynamic cross reference links in a Word document torajudo Microsoft Word Help 5 April 27th 23 08:57 PM
How to select paragraph between tow specified words? ALIOX Microsoft Word Help 1 June 28th 05 08:56 AM
Numbers to appear at the cursor... ~D~ New Users 11 February 1st 05 04:49 AM
Mirror Text Box [email protected] Formatting Long Documents 1 January 24th 05 07:02 PM


All times are GMT +1. The time now is 09:31 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"