|
附件有四行文字和一段宏语言,宏语言的作用是将其中的“黑体”“楷体”“方正小标宋简体”等字体加粗,然后全文变成12号的微软雅黑字体,现在我遇到的问题是,同样是黑体,在运行宏命令以后部分加粗,部分并未加粗,感觉问题出在文字格式本身,但是没找到问题所在,请高手帮忙看一下,具体见附件
附件.rar
(15.13 KB, 下载次数: 0)
Sub 宏()
Selection.WholeStory
With ActiveDocument.Content.Find
.ClearFormatting
.Font.Name = "黑体"
With .Replacement
.ClearFormatting
.Font.Bold = True
End With
.Execute FindText:="", ReplaceWith:="", Format:=True, Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.ClearFormatting
.Font.Name = "楷体_GB2312"
With .Replacement
.ClearFormatting
.Font.Bold = True
End With
.Execute FindText:="", ReplaceWith:="", Format:=True, Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.ClearFormatting
.Font.Name = "楷体"
With .Replacement
.ClearFormatting
.Font.Bold = True
End With
.Execute FindText:="", ReplaceWith:="", Format:=True, Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.ClearFormatting
.Font.Name = "方正小标宋简体"
With .Replacement
.ClearFormatting
.Font.Bold = True
End With
.Execute FindText:="", ReplaceWith:="", Format:=True, Replace:=wdReplaceAll
End With
ActiveDocument.AcceptAllRevisions
ActiveDocument.TrackRevisions = False
Selection.Font.Size = 12
Selection.Font.Name = "微软雅黑"
End Sub
|
|