Replace Format?

  • Thread starter Thread starter Michael Vang
  • Start date Start date
M

Michael Vang

I have a really long text that I want to edit. Is it
possible to make:

a) Making all sentences that are between (two
paranthesis) italic? Or between [two brackets]? Or
between !two exclamation points! ???

b) Making every single word that ends with : bold?
using Replace function or any other way? (I'm using
Office XP)
 
Use Edit>Replace, click on the More button and check the Use wildcards box.
In the Find what: control, enter

(\[)(*@)(\])

move to the Replace with control and enter

\2

and then click on the Format button, select Font and then select Italic.

Then click on Replace all

See the article "Finding and replacing characters using wildcards" at:

http://word.mvps.org/FAQs/General/UsingWildcards.htm
--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
You can certainly do a) and b):

For a):

Press Ctrl+H, or Edit > Replace. Click the More button on
the Replace screen. This will give you all the options
you need to run this search. For your specific search,
you need to complete the criteria as follows. Click the
check-box marked 'Use wildcards'. In the Find what:
control, enter

(\()(*@)(\))

then, move to the Replace with: control and enter

\2

then, click on the Format button, select Font and then
select Italic.

then click on Replace all button.

For between brackets, in the Find what: control, enter
(\[)(*@)(\])
then enter \2 in the Replace with: control.

For between exclamations, in the Find what: control, enter
(\!)(*@)(\!)
then enter \2 in the Replace with: control.

Hope you got the concept for a).


For b):

Press Ctrl+H, or Edit > Replace. Click the More button on
the Replace screen. Click the check-box marked 'Use
wildcards'. In the Find what: control, enter

:

Now click on the button marked 'Special' and choose the
character for end of word ('>').

- you will notice that there are a number of special
operator characters which Word uses as wildcards in its
search and replace.

Next, since you are only changing the formatting, not the
text, so click in the Replace with: control, click
the 'Format' button, select 'Font', adjust the font
screen until it matches the replacement font you want
e.g. in your example, click 'Bold'. Click OK. Click Find
Next to anticipate changes before they are made,
otherwise click Replace All.

Hope you got the concept for b) too.

Good luck.

Kar Hwa Hew
 
Back
Top