A
andreas
Dear Experts:
For some specific reasons I am using the Selection Object for a search
operation.
below macro searches for two or more consecutive tab stops. The
trouble is, if an occurrence of two consecutive tab stops is found the
initial selection is reduced to the length of the first occurrence.
Is it possible to preserve the initial selection and re-activate it
after the first occurrence of two or more consecutive tab stops?
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^t{2;}"
.Forward = True
.Wrap = wdFindStop
.MatchWildcards = True
End With
Selection.Find.Execute
If Selection.Find.Found Then
If MsgBox("Consecutive Tab Stops found! Would you like to
continue?", vbCritical, "Consectutive Tab Stops found!") = vbNo Then
Exit Sub
End If
Else .... (The initial selection should be re-activated)
For some specific reasons I am using the Selection Object for a search
operation.
below macro searches for two or more consecutive tab stops. The
trouble is, if an occurrence of two consecutive tab stops is found the
initial selection is reduced to the length of the first occurrence.
Is it possible to preserve the initial selection and re-activate it
after the first occurrence of two or more consecutive tab stops?
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^t{2;}"
.Forward = True
.Wrap = wdFindStop
.MatchWildcards = True
End With
Selection.Find.Execute
If Selection.Find.Found Then
If MsgBox("Consecutive Tab Stops found! Would you like to
continue?", vbCritical, "Consectutive Tab Stops found!") = vbNo Then
Exit Sub
End If
Else .... (The initial selection should be re-activated)