|
本帖最后由 zzpsx 于 2018-2-19 19:07 编辑
如何写代码,让选中后的选项号变成大写.rar
(8.12 KB, 下载次数: 6)
下面代码是我录制的。可能用不了。代码中需要写明对选中文字操作,避免替换分割线上面的文字。
'
' 选项号变成大写 Macro
' 宏在 2018-2-19 由 微软用户 录制
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "a."
.Replacement.Text = "A."
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "b."
.Replacement.Text = "B."
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "c."
.Replacement.Text = "C."
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
|
|