|
楼主,厉害!用替换就完成了!我给你的代码精简了一下:
- Sub 插入注解H_OK()
- With Selection
- .HomeKey Unit:=wdStory
- With .Find
- .ClearFormatting
- .Text = "(*)([^13。:])"
- .Font.NameFarEast = "黑体"
- With .Replacement
- .ClearFormatting
- .Text = "〖HTH〗\1〖HT〗\2"
- End With
- .Execute MatchWildcards:=True, Forward:=True, Format:=True, Replace:=wdReplaceAll
- End With
- End With
- End Sub
- Sub 插入注解K_OK()
- With Selection
- .HomeKey Unit:=wdStory
- With .Find
- .ClearFormatting
- .Text = "(*)([^13。:])"
- .Font.NameFarEast = "楷体"
- With .Replacement
- .ClearFormatting
- .Text = "〖HTK〗\1〖HT〗\2"
- End With
- .Execute MatchWildcards:=True, Forward:=True, Format:=True, Replace:=wdReplaceAll
- End With
- End With
- End Sub
复制代码 |
|