B
benkasminbullock
A job I frequently need to do is to change a particular Japanese
character, $B!n(B, which is a degree sign plus a C, into a Western style
degree sign plus a C, as in $B!k(BC. In Word, it is easy for me to find and
replace the character. However, after I have done that, I am left with
the degree sign in the Japanese font. If I select the degree sign and
then change the font to Times New Roman, Word changes it correctly,
but I have not been able to automate this process. Strategies I've
tried include:
1. Recording a macro as I change the font. This fails because the
macro is empty - nothing is recorded.
2. Writing a macro and explicitly requesting a change of font name.
I've tried the following two ideas:
a. Selection.Font.Name = "Times New Roman"
b. Selection.Font.NameFarEast = "Times New Roman"
c. Selection.LanguageID = wdEnglishUS
Idea a. simply does nothing - the selected text remains in its
original state, and as far as I can see "Times New Roman" is added to
the style.
Idea b. causes a crash:
Idea c. doesn't do anything.
Note that changing the language (idea c) or changing the font (idea a)
in Word both achieve the correct result.
I can't think of anything else to try, so does anyone have a good
idea?
character, $B!n(B, which is a degree sign plus a C, into a Western style
degree sign plus a C, as in $B!k(BC. In Word, it is easy for me to find and
replace the character. However, after I have done that, I am left with
the degree sign in the Japanese font. If I select the degree sign and
then change the font to Times New Roman, Word changes it correctly,
but I have not been able to automate this process. Strategies I've
tried include:
1. Recording a macro as I change the font. This fails because the
macro is empty - nothing is recorded.
2. Writing a macro and explicitly requesting a change of font name.
I've tried the following two ideas:
a. Selection.Font.Name = "Times New Roman"
b. Selection.Font.NameFarEast = "Times New Roman"
c. Selection.LanguageID = wdEnglishUS
Idea a. simply does nothing - the selected text remains in its
original state, and as far as I can see "Times New Roman" is added to
the style.
Idea b. causes a crash:
Run-time error '5844':
One of the values passed to this method or property is incorrect.
Idea c. doesn't do anything.
Note that changing the language (idea c) or changing the font (idea a)
in Word both achieve the correct result.
I can't think of anything else to try, so does anyone have a good
idea?