Search and replace question

B

Ben K. Bullock

Thanks to the help of people in this newsgroup, I've been able to solve one
problem I had.

I frequently want to replace a symbol from Japanese fonts: $B!n(B with the
equivalent in Century or other western fonts, which is $B!k(BC (a degree sign
followed by capital C for "degrees centigrade"). I had always been troubled
by how to get the degree sign into the "replace with" box but thanks to the
posters on this newsgroup I learnt that I could use control-v to paste into
the box and do a global replace of all the Japanese symbols.

This, however, left me with another problem. The Japanese symbol was
replaced by the degree sign, $B!k(B, but unfortunately the degree sign was still
in the Japanese font. I know from various trials that the degree sign is in
most of the common fonts on Word, so it is not a problem with the font not
being available. Can anyone tell me how to change the degree sign into the
Western font automatically?

Thank you very much for any suggestions or help with this one.
 
D

Daiya Mitchell

If you click on More in the Find and Replace dialog, you will see a little
Format drop down menu.

With the cursor in the appropriate box, you can use that Format menu to also
set a font for the replace text.
 
B

Ben K. Bullock

Daiya Mitchell said:
If you click on More in the Find and Replace dialog, you will see a little
Format drop down menu.

With the cursor in the appropriate box, you can use that Format menu to
also
set a font for the replace text.

Thanks Daiya, I tried this, but unfortunately it doesn't work. I set the
replacement text font to "Century" and the original is in something called
MS Mincho, but I still can't get it to change the font. If it is in Century
it stays that way, and if it is in MS Mincho it stays as MS Mincho. Perhaps
I'll have to try the Japanese language newsgroup to find out what is
happening.

Thank you again for the help.
 
S

Suzanne S. Barnhill

MS Mincho is very invasive. I have shortcuts for several symbols that have
been defined as "(normal text)" and are present in all the fonts I use, yet
they tend to revert to MS Mincho when my back is turned. And apparently en
and em spaces are always (covertly) MS Mincho.

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

Ben K. Bullock

Really? I didn't know MS Mincho was even present on the English version of
Word.

The problem is that the MS Mincho degree symbol and the other one look
totally different. The Mincho one has a great big piece of whitespace after
it.

I solved the problem by doing a "search" for °, selecting everything that
was searched for, and then doing a global font change on the selection,
which was quite a good work around. Unfortunately I can't work out how to
make that into a macro; see my enquiry in the visual basic group.

Thanks again.
 
B

Ben K. Bullock

Further to this discussion, I ripped the following off from a recent post to
the vba.beginners newsgroup and tried it for my replacement instead of the
macro-recorder version.

The strange thing is that with this version (the whole of which is copied
below), the font replacement is carried out correctly. I've tried it on a
small sample file and also on the original file which was causing problems,
with and without track changes, and it works perfectly.

Sub zapa()
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="℃", _
MatchWildcards:=False, _
Wrap:=wdFindContinue, Forward:=True) = True
Selection.Range = "°C"
Loop
End With
End Sub

It may be just because I'm a beginner, but macros in Microsoft Word seem to
be some kind of crazy voodoo where you can't possibly tell what's going to
happen.

Oh well, thanks for the help from everyone.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top