
else RestrictSearchArea (DateField.Rect); This code means that searching for the date field as a string or as an object collection will only be attempted if the program fails to detect it by means of the Date element. And both elements will be looked for in the very area where the element DateField has not been detected. It so happens because the DateField.Rect method restores the rectangle enclosing the hypothesis of the DateField element. Since the hypothesis has not been found, the enclosing rectangle will coincide with the search area. Therefore, we specify a search area for the DateAsString and DateAsObjectCollection elements which coincides with the rectangle enclosing the search area of the undetected DateField element.
