word 文档刷文字格式

.

Sub AutoClose()
    Selection.WholeStory
    Selection.Font.NameFarEast = "DFKai-SB"
    Selection.Font.NameAscii = "Times New Roman"
    Selection.HomeKey Unit:=wdStory
    Do
        Selection.Find.ClearFormatting
        Selection.Find.Execute findtext:="^#"
        If Selection.Find.Found = True Then Selection.Font.Name = "Times New Roman"
    Loop Until Selection.Find.Found = False
End Sub

猜你喜欢

转载自www.cnblogs.com/infoset/p/9938276.html