Hi Stevie,
I let my body tell me! I found I was really turned off anything that had been hanging around a couple of days, and couldn't even stop at a deli counter!
I think if you bought the ham yourself and sliced it with clean knife etc. it wouldn't be too bad. Keep in mind the more surface area, the more places for bacteria to grow! So if you buy already sliced ham, the risk is greater than if you buy a chunk and slice it.
In saying that, since being pg I have eaten soft cheese, deli meats, raw seafood, unwashed veges in Vietnam, bought dips, ready made salads - so I'm really not the best person to ask!
Best wishes for your pg - hope its all happy and healthy!
Fiona