is he barking because he's being friendly and wants attention, or is he barking because he's being territorial and doesn't like people coming into his house and is trying to drive them away? How old is your dog?
*Teach dog a cue for quiet.
*Teach dogs that visitors are good - have visitors and yourself click and treat quiet (even a pause in barking to take a breath!) and treat.
*Have visitors be very boring except for treat dispensers - have them sit down, not doing much. Ensure they ignore the dog.
*If visitors are unwilling to help you overcome this, remove dog and put him in a different room.
If you need help or explaination on 'how' for any of these steps, let me know.