|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
139:还是在你的帖子回复吧,还是第3个小问题:黑圈123白圈一二三加顿号的宏:(再试试。另外:你前2个小问题,多次替换的问题,是A替换为甲,B替换为乙,C替换为丙,D替换为丁……这样吗?)
- Sub 黑圈123加顿号()
- 'MS Gothic字体:黑圈1/2/3后加顿号
- Selection.HomeKey unit:=wdStory
- Do
- Selection.Find.ClearFormatting
- Selection.Find.Execute findtext:=ChrW(10102)
- If Selection.Find.Found = True Then
- Selection.MoveEnd unit:=wdCharacter, Count:=1
- If Selection.Characters.Last.Text Like "[ ]" Or Selection.Characters.Last.Text = ChrW(160) Then Selection.Characters.Last.Delete
- If Len(Selection) = 1 Then
- Selection.InsertAfter Text:="、"
- Else
- If Selection.Characters.Last.Text <> "、" Then Selection.MoveEnd unit:=wdCharacter, Count:=-1: Selection.InsertAfter Text:="、"
- End If
- Selection.MoveRight unit:=wdCharacter, Count:=1
- End If
- Loop Until Selection.Find.Found = False
- '
- Selection.HomeKey unit:=wdStory
- Do
- Selection.Find.ClearFormatting
- Selection.Find.Execute findtext:=ChrW(10103)
- If Selection.Find.Found = True Then
- Selection.MoveEnd unit:=wdCharacter, Count:=1
- If Selection.Characters.Last.Text Like "[ ]" Or Selection.Characters.Last.Text = ChrW(160) Then Selection.Characters.Last.Delete
- If Len(Selection) = 1 Then
- Selection.InsertAfter Text:="、"
- Else
- If Selection.Characters.Last.Text <> "、" Then Selection.MoveEnd unit:=wdCharacter, Count:=-1: Selection.InsertAfter Text:="、"
- End If
- Selection.MoveRight unit:=wdCharacter, Count:=1
- End If
- Loop Until Selection.Find.Found = False
- '
- Selection.HomeKey unit:=wdStory
- Do
- Selection.Find.ClearFormatting
- Selection.Find.Execute findtext:=ChrW(10104)
- If Selection.Find.Found = True Then
- Selection.MoveEnd unit:=wdCharacter, Count:=1
- If Selection.Characters.Last.Text Like "[ ]" Or Selection.Characters.Last.Text = ChrW(160) Then Selection.Characters.Last.Delete
- If Len(Selection) = 1 Then
- Selection.InsertAfter Text:="、"
- Else
- If Selection.Characters.Last.Text <> "、" Then Selection.MoveEnd unit:=wdCharacter, Count:=-1: Selection.InsertAfter Text:="、"
- End If
- Selection.MoveRight unit:=wdCharacter, Count:=1
- End If
- Loop Until Selection.Find.Found = False
- 'MS Gothic字体:白圈一/二/三后加顿号
- Selection.HomeKey unit:=wdStory
- Do
- Selection.Find.ClearFormatting
- Selection.Find.Execute findtext:=ChrW(12928)
- If Selection.Find.Found = True Then
- Selection.MoveEnd unit:=wdCharacter, Count:=1
- If Selection.Characters.Last.Text Like "[ ]" Or Selection.Characters.Last.Text = ChrW(160) Then Selection.Characters.Last.Delete
- If Len(Selection) = 1 Then
- Selection.InsertAfter Text:="、"
- Else
- If Selection.Characters.Last.Text <> "、" Then Selection.MoveEnd unit:=wdCharacter, Count:=-1: Selection.InsertAfter Text:="、"
- End If
- Selection.MoveRight unit:=wdCharacter, Count:=1
- End If
- Loop Until Selection.Find.Found = False
- '
- Selection.HomeKey unit:=wdStory
- Do
- Selection.Find.ClearFormatting
- Selection.Find.Execute findtext:=ChrW(12929)
- If Selection.Find.Found = True Then
- Selection.MoveEnd unit:=wdCharacter, Count:=1
- If Selection.Characters.Last.Text Like "[ ]" Or Selection.Characters.Last.Text = ChrW(160) Then Selection.Characters.Last.Delete
- If Len(Selection) = 1 Then
- Selection.InsertAfter Text:="、"
- Else
- If Selection.Characters.Last.Text <> "、" Then Selection.MoveEnd unit:=wdCharacter, Count:=-1: Selection.InsertAfter Text:="、"
- End If
- Selection.MoveRight unit:=wdCharacter, Count:=1
- End If
- Loop Until Selection.Find.Found = False
- '
- Selection.HomeKey unit:=wdStory
- Do
- Selection.Find.ClearFormatting
- Selection.Find.Execute findtext:=ChrW(12930)
- If Selection.Find.Found = True Then
- Selection.MoveEnd unit:=wdCharacter, Count:=1
- If Selection.Characters.Last.Text Like "[ ]" Or Selection.Characters.Last.Text = ChrW(160) Then Selection.Characters.Last.Delete
- If Len(Selection) = 1 Then
- Selection.InsertAfter Text:="、"
- Else
- If Selection.Characters.Last.Text <> "、" Then Selection.MoveEnd unit:=wdCharacter, Count:=-1: Selection.InsertAfter Text:="、"
- End If
- Selection.MoveRight unit:=wdCharacter, Count:=1
- End If
- Loop Until Selection.Find.Found = False
- End Sub
复制代码 |
|