求助如何完成含有纯英文段落、纯汉文段落以及英汉混杂段落的文档字体的修改? 我试了如下宏,情况如下,见附件说明: Subtest1() ActiveDocument.Content.InsertBefore vbCr Dim myRange As Range Set myRange = ActiveDocument.Content myRange.Find.ClearFormatting Do WhilemyRange.Find.Execute(FindText:="(^13)([!A-Za-z]@)(^13)([!A-Za-z]@)(^13)",Wrap:=wdFindStop, Format:=False, MatchWildcards:=True) myRange.CharacterWidth =wdWidthFullWidth myRange.Font.Name = "宋体" myRange.Font.Size = 10.5 myRange.Font.Italic = False myRange.Font.Bold = False Set myRange =ActiveDocument.Range(myRange.End, ActiveDocument.Content.End) Loop Do WhilemyRange.Find.Execute(FindText:="(^13)([!A-Za-z]@)(^13)",Wrap:=wdFindStop, Format:=False, MatchWildcards:=True) myRange.CharacterWidth =wdWidthFullWidth myRange.Font.Name = "宋体" myRange.Font.Size = 10.5 myRange.Font.Italic = False myRange.Font.Bold = False Set myRange =ActiveDocument.Range(myRange.End, ActiveDocument.Content.End) Loop ActiveDocument.Paragraphs(1).Range.Text =Empty EndSub Subtest2() ActiveDocument.Content.InsertBefore vbCr Dim myRange As Range Set myRange = ActiveDocument.Content myRange.Find.ClearFormatting Do WhilemyRange.Find.Execute(FindText:="(^13)([!A-Za-z]@)(^13)",Wrap:=wdFindStop, Format:=False, MatchWildcards:=True) myRange.CharacterWidth =wdWidthFullWidth myRange.Font.Name = "宋体" myRange.Font.Size = 10.5 myRange.Font.Italic = False myRange.Font.Bold = False Set myRange =ActiveDocument.Range(myRange.End, ActiveDocument.Content.End) Loop Do WhilemyRange.Find.Execute(FindText:="(^13)([!A-Za-z]@)(^13)([!A-Za-z]@)(^13)",Wrap:=wdFindStop, Format:=False, MatchWildcards:=True) myRange.CharacterWidth =wdWidthFullWidth myRange.Font.Name = "宋体" myRange.Font.Size = 10.5 myRange.Font.Italic = False myRange.Font.Bold = False Set myRange =ActiveDocument.Range(myRange.End, ActiveDocument.Content.End) Loop ActiveDocument.Paragraphs(1).Range.Text =Empty EndSub
|