Need to "find" an entire word and "replace" only part of it

V

VictorD

Greetings,
This is easy for me to communicate wrong so I will try to be careful
in my description.

I have many documents that have a brand-name within it that needs to
be formatted with half of the word in an Arial font and half of the
word needs to be "Times Roman, Italicized". The first letter of the
word needs to be uppercase. This is constantly done wrong in documents
(because it is a pain) so documents are violating branding standards.

I would like to use Word to find all instances of the brand-name
(regardless of the formatting and replace them with properly formatted
text.

I can find how to format an entire word with a formatted text. I
cannot find how to do a combination of fonts within a word nor can I
figure-out how to make the first letter upper-case.

If I can figure this out I can make a macro and place a button on the
toolbar. It would be so cool.

~vic
 
G

garfield-n-odie

It's possible to do this in two search-and-replace operations. It would
be easier to explain if I knew what the actual brandname was. I'm going
to assume that:
1. "Brandname" (all one word) is not a common word.
2. The "Brand" and "name" parts of "Brandname" are common words.
3. You want "Brand" to be Arial.
4. You want "name" to be Times New Roman italic.

Click on Find | Replace.

In the "Find what" box, type "brandname" (without quotes). In the
"Replace with" box, type "XXXXBrandname" (without quotes). Click on the
Format button in the Find and Replace dialog box. Click on Font | Font:
Times New Roman | Font style: Italic. Check the "Match case" box.
Click on Replace All.

In the "Find what" box, type "XXXXBrand" (without quotes). In the
"Replace with" box, type "Brand" (without quotes). Click on the Format
button in the Find and Replace dialog box. Click on Font | Font: Arial
| Font style: Regular. The "Match case" box should still be checked.
Click on Replace All.

Finished!

In this example, the XXXX is needed to turn the common word Brand into a
unique word XXXXBrand. The XXXX can be any string of a few characters
that do not appear elsewhere in the document.

To avoid this problem in new documents, you can add a formatted-text
Autocorrect entry to your normal.dot template so that every time someone
types brandname or Brandname, Word will automatically change it to
Brandname with Brand in Arial and name in TNR italic.
 
J

Jezebel

You might want to check with your legal people on this one. I've seen
lengthy legal opinions arguing that you *weaken* your brand ownership by
requiring specific formatting when the brand name is used as text. The
lawyers insisted that the branding standards should make a distinction
between the brand name used as a brand and the name used as a word. (I'm not
saying that this opinion is necessarily correct, only that I've seen it
argued more than once by major law firms.)
 
G

Graham Mayor

I think I might adopt a different approach.
Type the name and format it as required.
Copy the formatted text to the clipboard.
Search for the name
replace with the clipboard content (^c).

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
V

VictorD

Thanks all. I have tried the simpler approach that Greg provided as well as the "dual pass" approach from Garfiled-n-odie.

Here is my status:
When trying Greg's approach, I typed the entry on the top of the page and cut it to the clipboard, the did a "find>highlight all in document" then am pasting to relace all selected text.
the wrong font size unfortunatly pastes throughout the document. (understanding I would like to make a macro with this)

I was successful with the two pass approach from Garfiled-n-Odie but am having issues getting the macro to replicate my manual steps. This however is successfully adjusting the font size to the target.

Sincere thanks for the help you all have been. This seems like a no-big-deal thing but is a constant burden.
 
V

VictorD

Thanks all. I have tried the simpler approach that Greg provided as well as the "dual pass" approach from Garfiled-n-odie.

Here is my status:
When trying Greg's approach, I typed the entry on the top of the page and cut it to the clipboard, the did a "find>highlight all in document" then am pasting to relace all selected text.
the wrong font size unfortunatly pastes throughout the document. (understanding I would like to make a macro with this)

I was successful with the two pass approach from Garfiled-n-Odie but am having issues getting the macro to replicate my manual steps. This however is successfully adjusting the font size to the target.

Sincere thanks for the help you all have been. This seems like a no-big-deal thing but is a constant burden.
 
V

VictorD

Thanks all. I have tried the simpler approach that Greg provided as well as the "dual pass" approach from Garfiled-n-odie.

Here is my status:
When trying Greg's approach, I typed the entry on the top of the page and cut it to the clipboard, the did a "find>highlight all in document" then am pasting to relace all selected text.
the wrong font size unfortunatly pastes throughout the document. (understanding I would like to make a macro with this)

I was successful with the two pass approach from Garfiled-n-Odie but am having issues getting the macro to replicate my manual steps. This however is successfully adjusting the font size to the target.

Sincere thanks for the help you all have been. This seems like a no-big-deal thing but is a constant burden.
 
S

Suzanne S. Barnhill

Actually, Graham's approach is by far the simplest. Perhaps that's the one
you meant?



VictorD said:
Thanks all. I have tried the simpler approach that Greg provided as well
as the "dual pass" approach from Garfiled-n-odie.
Here is my status:
When trying Greg's approach, I typed the entry on the top of the page and
cut it to the clipboard, the did a "find>highlight all in document" then am
pasting to relace all selected text.
the wrong font size unfortunatly pastes throughout the document.
(understanding I would like to make a macro with this)
I was successful with the two pass approach from Garfiled-n-Odie but am
having issues getting the macro to replicate my manual steps. This however
is successfully adjusting the font size to the target.
Sincere thanks for the help you all have been. This seems like a
no-big-deal thing but is a constant burden.
 
V

VictorD

Yes Susan you are correct. Any ideas how to get the font to paste correctly? If I put a formatted 11pt font on the clipboard, that is what it pastes. So it overwrites for instance a heading that may have a different font.
 
S

Suzanne S. Barnhill

If you need it to match just the font (Arial Regular, TNR Italic) and not
the font size, then you'll need to go with the two-step F&R, I'm afraid.



VictorD said:
Yes Susan you are correct. Any ideas how to get the font to paste
correctly? If I put a formatted 11pt font on the clipboard, that is what it
pastes. So it overwrites for instance a heading that may have a different
font.
 
G

Graham Mayor

I thought the whole idea was to replace the font?

Provided the font *size* remains the same, the technique can easily be put
into a macro. All you need to do is save the formatted text as an autotext
entry, then the following macro will work:

Selection.HomeKey Unit:=wdStory
NormalTemplate.AutoTextEntries("Brandname").Insert _
Where:=Selection.Range, RichText:=True
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Cut
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "Put the name to find here"
.Replacement.Text = "^c"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

If font size is important then you will have to try the double pass approach
as suggested by Suzanne.
Do you have problems reading our names ;)

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Top