軟體:word
版本:2007
我錄製了一個巨集
大致上就是,找到一個樣式,然後在它前、後各加上一個特殊符號
但只能執行一次
請問要如何一直執行到文件最後呢?
附上我的巨集:
Sub 套word()
'
' 套word 巨集
'
'
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("word")
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="★"
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("word")
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.TypeText Text:="☆"
End Sub