Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The problem is <strong>directly</strong> related to the font and language: Georgia and 中文. Georgia does not support Chinese characters and your default language Chinese, so it defaults the font a character set that does support it (probably SimSun or MS Mincho). SimSun <em>does</em> support Cyrillic, except for one character (o), so the total selection is listed as blank in the font list (because you have mixed fonts). If you change the language of the selection to Russian, you will see that it does display "Georgia". So at end of your macro you could put:</p> <pre> Selection.WholeStory Selection.Font.Size = 12 Selection.Font.Name = "Georgia" <b>Selection.LanguageID = wdRussian</b> </pre> <p>And then it would work. I've tested on:</p> <ul> <li>Word 2003 Chinese Taiwan (中文(繁體)), Windows Vista</li> <li>Word 2010 Chinese P.R.C. (中文(简体)), Windows XP</li> </ul> <p>and the result is the same - the font becomes Georgia. If you just change the language off of Chinese Taiwan to Russian or English for the letters/characters you are converting, you'll get the right font listed.</p> <p>Also, I've tried to simplify your code as it was just too long and had stuff in there that wasn't needed:</p> <pre> Sub ReplaceText(Text As String, ReplacementText As String) Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = Text .Replacement.Text = ReplacementText .Forward = True .Wrap = wdFindContinue .Format = False .MatchByte = True End With Selection.Find.Execute Replace:=wdReplaceAll End Sub Sub Code() ReplaceText "jio", ChrW(1105) ReplaceText "zh", ChrW(1078) ReplaceText "ja", ChrW(1103) ReplaceText "ju", ChrW(1102) ReplaceText "aj", ChrW(1072) & ChrW(1081) ReplaceText "ej", ChrW(1077) & ChrW(1081) ReplaceText "ij", ChrW(1080) & ChrW(1081) ReplaceText "oj", ChrW(1086) & ChrW(1081) ReplaceText "uj", ChrW(1091) & ChrW(1081) ReplaceText "ey", ChrW(1101) ReplaceText "yj", ChrW(1099) & ChrW(1081) ReplaceText "ju", ChrW(1102) ReplaceText "ja", ChrW(1103) ReplaceText ChrW(1105) & "j", ChrW(1105) & ChrW(1081) ReplaceText ChrW(1101) & "j", ChrW(1101) & ChrW(1081) ReplaceText ChrW(1102) & "j", ChrW(1102) & ChrW(1081) ReplaceText ChrW(1103) & "j", ChrW(1103) & ChrW(1081) ReplaceText "jj", ChrW(1098) ReplaceText "q", ChrW(1098) ReplaceText " j", " " & ChrW(1081) ReplaceText "j", ChrW(1100) ReplaceText "b", ChrW(1073) ReplaceText "v", ChrW(1074) ReplaceText "g", ChrW(1075) ReplaceText "d", ChrW(1076) ReplaceText "z", ChrW(1079) ReplaceText "k", ChrW(1082) ReplaceText "l", ChrW(1083) ReplaceText "m", ChrW(1084) ReplaceText "n", ChrW(1085) ReplaceText "p", ChrW(1087) ReplaceText "r", ChrW(1088) ReplaceText "t", ChrW(1090) ReplaceText "f", ChrW(1092) ReplaceText "x", ChrW(1093) ReplaceText "ch", ChrW(1095) ReplaceText "sh", ChrW(1096) ReplaceText "s", ChrW(1089) ReplaceText "c", ChrW(1094) ReplaceText "w", ChrW(1097) ReplaceText "y", ChrW(1099) ReplaceText "e", ChrW(1077) ReplaceText "i", ChrW(1080) ReplaceText "u", ChrW(1091) ReplaceText ChrW(1054) & ChrW(1049), ChrW(1086) & ChrW(1081) ReplaceText " " & ChrW(1071), " " & ChrW(1103) ' AllToGeorgia12: Selection.WholeStory Selection.Font.Size = 12 Selection.Font.Name = "Georgia" Selection.LanguageID = wdRussian End Sub </pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload