Attribute VB_Name = "Char2pinyin" Sub Char2pinyin() Attribute Char2pinyin.VB_Description = "Macro recorded 6/4/02 by mss" Attribute Char2pinyin.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.Char2pinyin" ' ' Char2pinyin Macro ' Macro recorded 6/4/02 by k ' Place the cursor before the character to convert. ' Cannot handle periods or commas. ' Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend Selection.Copy MyChar = Selection.Text Windows("cedict.gb").Activate Selection.Find.ClearFormatting With Selection.Find .Text = "^p" & MyChar & " [" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend Selection.Copy Windows("youngPioneers_oath.doc").Activate Selection.Paste End Sub