word 宏VBA实现查找内容字体替换字体

180it 2019-09-25 PM 5759℃ 0条

Sub ChaFontName()
With ActiveDocument.Content.Find
.ClearFormatting
.Font.Name = "Times New Roman" '查找宋体
'.Font.Size = "小四"

With .Replacement
.ClearFormatting
.Font.Name = "宋体" '替换成楷体
.Font.Size = "10"
End With

.Execute FindText:="A", ReplaceWith:="A", Format:=True, Replace:=wdReplaceAll

End With
End Sub

支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

word 宏VBA实现查找内容字体替换字体