In a Word 2007 macro that finds text using wildcards, how do I access the group match values?
For example, if I script a macro that searches for DATE: (<*>)^13
, how would I find the value of the match group (<*>)
?
Thank you,
Ben
Sub Search()
Selection.Find.ClearFormatting
With Selection.Find
.Text = "DATE: (<*>)^13"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
End Sub