Mike,
You have two options here - 3D contact and cams. I would try a cam-pair first as this should solve more readily than 3D contact. If you make a flat surface on your moving object contact a flat "ground" wall for the distance the object is constrained as a slider, but have it also in a slot joint, you can achive the DOF you're looking for. The trick with the cam is that one of the surfaces will need to be a closed loop in order to work properly against a truely flat surface (grounded, second cam body). Try it and let us know how it works ... or doesn't, and I can provide more help.
Cheers,
Chris