The short answer: It is not recommended.
The long answer: Ham is processed meat that comes from a pork leg cut. It is preserved through wet or dry curing, and sometimes smoked. Because the preservation and flavouring process of ham is done with salt, it is highly unsuitable for dogs. Salt can make your dog extremely thirsty, and can even lead to sodium ion poisoning. Symptoms include vomiting, diarrhea, lethargy, loss of appetite, bloating, excessive thirst or urination, tremors, and seizures.
Ham is also packed with fat, which can cause obesity, heart disease, and pancreatitis if fed to your dog repeatedly. Depending on the ingredients used, the additional glazes, sauces, and seasonings included in ham servings can create additional complications.
Whether raw or cooked, ham bones are another thing you should be wary of. Raw ham bones may contain bacteria that are harmful for your dog, while cooked bones may splinter, block, and damage your dog’s mouth, throat, and internal organs.
What to do if your dog accidentally eats ham: Keep a close eye on your dog after he ingests a piece of ham. Though ham is technically not toxic to dogs, it may or may not affect him based on his sensitivity to salt and fat. If you notice your dog acting differently, call your veterinarian immediately.
In summary: Though it’s tempting to treat your dog to some juicy slices of ham, he’s better off eating his own food or other healthier alternatives. The sodium and fat content in ham could just end up damaging his digestive system.