Answer: With the holidays coming up, and the likelihood of a few visitors to your house, this is a timely question. There are a few things to try to help teach your dog not to bark so much, although this can be a challenging problem to fix.
First, be sure there are some tasty, smelly treats handy near the door at all times (but out of reach of your dog) and carry a pocketful with you at all times during walks with your dog. When he barks, don't yell at him to stop. Instead hold one of these treats off to the side of his nose where he can smell it. His natural instinct will be to sniff it, and it's impossible for him to sniff and bark at the same time. To prove this to yourself, try speaking and sniffing something at the same time. Can't do it.
When your dog stops barking to smell what you are offering, you should give him the treat, which will reward him for stopping his barking. Despite the concern that this will actually reward the barking of a few moments before, it has been shown that the reward actually reinforces the most recent behavior, which in this case is the act of STOPPING barking, rather than the behavior of just a few moments before which was the barking itself.
As is true of all rewards, the power of the reward diminishes exponentially over time (meaning very, very quickly) the longer after a behavior it is administered. So the most recent action - that of being quiet - is what is actually being rewarded more than the previous act of barking. And of course, consistent use of treats in this situation will speed the training.
Second, teaching a dog to bark on command (when he is not excited about anything) is generally easy to do by repeated telling him to "speak" while offering a reward. In this situation, once he has been taught to bark on command, you can then introduce a new command ("shush" or "quiet"), which can be followed by a reward when he stops barking on command. It is difficult - if not impossible - to teach an excited dog that is barking to be quiet on verbal command. However, if you can teach him to bark when he is not already excited, you have a much better chance of teaching him to then stop barking on command. That way, you have a reasonable chance of quieting him down from a distance, even when you aren't nearby him at the door to offer the treat as described in the first method above.
Third, there are a variety of "bark" collars - some that deliver a small electric shock and others than dispense a small squirt of citronella scent whenever a dog barks. Although this method will work for many dogs, its effect is by punishing him for barking, rather than rewarding him for being quiet. I generally prefer positive rewards for proper behavior rather than negative consequences for inappropriate behavior.
If, despite all the above attempts, your dog continues barking uncontrollably when visitors come over, see your veterinarian for a possible referral to a reputable dog trainer.
--Dr. Franklin Utchen, shown with his dog Tory, has been practicing veterinary medicine in the San Ramon Valley since 1989 and currently co-owns Bishop Ranch Veterinary Center & Urgent Care. For questions or comments e-mail firstname.lastname@example.org.