Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Page Layout / June 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
VictorD - 18 Jun 2004 23:29 GMT
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
garfield-n-odie - 19 Jun 2004 00:37 GMT
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.

> Greetings,
> This is easy for me to communicate wrong so I will try to be careful
[quoted text clipped - 18 lines]
>
> ~vic
Jezebel - 19 Jun 2004 03:56 GMT
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.)

> Greetings,
> This is easy for me to communicate wrong so I will try to be careful
[quoted text clipped - 18 lines]
>
> ~vic
Graham Mayor - 19 Jun 2004 09:13 GMT
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).

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Greetings,
> This is easy for me to communicate wrong so I will try to be careful
[quoted text clipped - 18 lines]
>
> ~vic
Greg Maxey - 19 Jun 2004 14:21 GMT
Smart guy. :-)

Signature

Greg Maxey
A peer in "peer to peer" support
Rockledge, FL
To e-mail, edit out the "w...spam" in gmaxey@whamspammvps.org

> I think I might adopt a different approach.
> Type the name and format it as required.
[quoted text clipped - 25 lines]
>>
>> ~vic
VictorD - 19 Jun 2004 14:50 GMT
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.
---
~Vic

> Smart guy. :-)
>
[quoted text clipped - 27 lines]
> >>
> >> ~vic
VictorD - 19 Jun 2004 14:50 GMT
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.
---
~Vic

> Smart guy. :-)
>
[quoted text clipped - 27 lines]
> >>
> >> ~vic
VictorD - 19 Jun 2004 14:51 GMT
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.
---
~Vic

---

> Greetings,
> This is easy for me to communicate wrong so I will try to be careful
[quoted text clipped - 18 lines]
>
> ~vic
Suzanne S. Barnhill - 19 Jun 2004 20:29 GMT
Actually, Graham's approach is by far the simplest. Perhaps that's the one
you meant?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Signature

Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


> 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.
> ---
[quoted text clipped - 24 lines]
> >
> > ~vic
VictorD - 19 Jun 2004 23:43 GMT
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.

Signature

~Vic

> Actually, Graham's approach is by far the simplest. Perhaps that's the one
> you meant?
[quoted text clipped - 51 lines]
> > >
> > > ~vic
Suzanne S. Barnhill - 20 Jun 2004 03:40 GMT
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.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Signature

Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.


> 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.

> --
> ~Vic
[quoted text clipped - 54 lines]
> > > >
> > > > ~vic
Graham Mayor - 20 Jun 2004 08:24 GMT
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 ;)

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> 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
[quoted text clipped - 69 lines]
>>>>
>>>> ~vic
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.