We attempt to extend the relation between the strengths of the interstellar CaII lines and the distances to early-type stars to objects beyond 1 kiloparsec, with the line saturation taken into account. We measure the CaII K and CaII H equivalent widths, and compute Ca II column densities for 262 lines of sight towards early-type stars with available Hipparcos parallaxes (pi). The targets are located within a few hundred parsecs of the Galactic plane, and span all the range of Galactic longitudes. We fit the N_CaII_ - parallax relation with a function of the form pi=1/(a.N_CaII_+b), using a maximum-likelihood approach to take account of errors in both variables. We use the resultant formula to estimate distances to stars in OB associations and clusters, and compare them to those found in the literature, usually estimated by spectrophotometric methods.