I had the same problem with one of my pups, and when anyone came over i would put him on the leash and make him sit the whole time. When he was good, he got a pet and a treat, when he was bad, he was ignored. Its a bit hard the first couple of times, when you have company over, to have a normal conversation. Try to get a few friends who will stop by and practice with you.