Translationally cold and slow ND3 is prepared by filtering the slow molecules from a thermal gas-phase sample using a curved electrostatic hexapole guide. This filter, like the curved quadrupole guide introduced by Rangwala et al. Phys. Rev. A 67 043406 (2003) selects molecules by their forward velocity and effective electric dipole moment. Here we describe two main modifications with respect to previous work: (1) A segmented hexapole guide is used that produces a harmonic potential for the linearly Stark-shifted levels of ND3. A curved guide is combined with a straight hexapole guide, and independent high-voltage supplies are employed to allow for bandpass velocity filtering. (2) State-selective laser ionization is used to obtain time- and state-selective detection of the guided molecules. This enables the experimental determination of the rotational state population of the guided molecules.