You could use something like:
Code:
Sub Demo()
Dim b As Boolean, Rng As Range
Const bForwards As Boolean = False
Set Rng = Selection.Range: b = False
With Selection
With .Find
.ClearFormatting
.Text = "<Z[0-9A-Z]Z[0-9A-Z]@>"
.Replacement.Text = ""
.Forward = bForwards
.Wrap = wdFindStop
.Format = False
.MatchWildcards = True
.Execute
End With
Do While .Find.Found
If .InRange(Rng) = False Then Exit Do
If Len(.Text) < 17 Then b = True
If b = True Then Exit Do
.Collapse bForwards + 1
.Find.Execute
Loop
End With
MsgBox b
End Sub