2022年7月6日 星期三

replace 萬用字元

 


replace sample

 Public Sub RE2L()


For j = 1 To ActiveDocument.Paragraphs.Count

    text1 = ActiveDocument.Paragraphs(j).Range.Text

    

    For i = 90 To 111

      text1 = Replace(text1, i & "統測", " [" & i & "統測]")

    Next i

    ActiveDocument.Paragraphs(j).Range.Text = text1

Next j


End Sub