Milkshape can, 'cause it's awesome. :D
Go to Tools > DirectX Mesh Tools > Press the open button > Press the save button once model is open in the viewer > You now have your .x model in Milkshape.
To export, do:
File > Export > DirectX 8.0 File > Follow the dialog.