Não consegui desenvolver bem o que me mostrou sobre Funções e sobre o método Range... Mas queria fazer outra pergunta: como faço para repetir um conjunto de ações sem precisar repetir o código inteiro:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[\(0-9-]{1;5}\/[\)^^0-9-]{1;10}"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.Font.Size = 26
Selection.OMaths.Add Range:=Selection.Range
Selection.OMaths(1).ParentOMath.Type = wdOMathInline
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[\(0-9-]{1;5}\/[\)^^0-9-]{1;10}"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute