You don't need to wait to do the preapp. Soft inquiries are not seen by anyone but you, and they have no effect on your scores.
You definitely should wait to do the actual application until after you close on the house, though. If doing the preapp will make it too tempting to wait on the application, then you might want to wait on that, as well.
In any case, here's the link: