We demonstrate an experimental technique that selects the nuclear spin I=0 isotope
138Ba for spectroscopic measurements from a beam of natural barium containing seven stable isotopes. A cw dye laser is used to optically pump the I=3/2 isotopes
135Ba and
137Ba into the metastable 6s5d
1D2 and
3D1,2 levels via the 6s6p
1P1 excited state, leaving nearly pure
138Ba in the ground state. Photoionization spectra of the excited 5d6p
3D1 even isotope state recorded with optical pumping of
135Ba and
137Ba to the metastable levels are essentially devoid of forbidden features associated with the hyperfine interaction in the odd isotopes.