FINDING AND REPLACING FORMATS

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I cannot get find and replace formats to work. I teach at a community college
and the instructions for using this feature in the text are not working. I am
using Office 2003 and Windows XP.
 
Please describe what result you are trying to achieve, what you are doing
(the "Find what" and "Replace with" settings), and what results you are
getting.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
We're searching for all occurences of Arial, 12 pt., Bold formatting. We want
to replace with 11 pt., Bookman Old Style, Bold, Italic formatting.

We go to the Find and Replace dialog box, delete what's in the Find What
text box then we click More, Format, Font and then make our choices.

After we make the choices and then click Replace All, it states 0
replacements were made. However the Arial, 12 pt., Bold is definitely there.
It doesn't matter where our cursor is in the document before we begin.
 
Hmm, very annoying. For a totally different method, see the excerpt from
Word's Help file at the end of this message. But first, try putting ^? in
the "Find what" box and ^& in the "Replace with" box. This is very slow,
though, because it will go character by character. If you check "Use
wildcards," you can instead use * to find text strings with the specified
formatting.

You can search for and replace or remove character formatting. For example,
find a specific word or phrase and change the font color, or find specific
formatting such as bold and remove or change it.
1. On the Edit menu, click Find.
2. If you don't see the Format button, click More.
3. In the Find what box, do one of the following:
* To search for text without specific formatting, enter the text.
* To search for text with specific formatting, enter the text, click
Format, and then select the formats you want.
* To search for specific formatting only, delete any text, click
Format, and then select the formats you want.
4. Select the Highlight all items found in check box to find all
instances of the word or phrase, and then select which portion of the
document you want to search in by clicking in the Highlight all items found
in list.
5. Click Find All.
All instances of the word or phrase are highlighted.

6. Click Close.
7. On the Formatting toolbar, click buttons to make changes. For example,
select a different font color, click Bold , and then click Italic .
The changes you make are applied to all the highlighted text.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
This method will replace manual formatting, but if the paragraphs are
formatted with styles, you need to replace the applied styles with suitable
replacement styles.

e.g. the first macro will replace the manual formatting, the second will
replace styles - but do insert your own style names where indicated.

You can combine the chain the two macros to suit both sets of circumstances

http://www.gmayor.com/installing_macro.htm


Sub ReplaceExample()

Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
'**********************
.Text = ""
.Font.Name = "Arial"
.Font.Bold = True
.Font.Size = "12"
.Replacement.Text = ""
.Replacement.Font.Name = "Bookman Old Style"
.Replacement.Font.Size = "11"
.Replacement.Font.Italic = True
'**********************
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
End With
Selection.Find.Execute replace:=wdReplaceAll
End Sub

Sub ReplaceExample2()

Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
'**********************
.Text = ""
.Style = "First Style Name"
.Replacement.Style = "Second Style Name"
'**********************
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
End With
Selection.Find.Execute replace:=wdReplaceAll
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top