We taught Lulu no to bark excessively early on. When she would start barking in an inappropriate situation, we would gently hold her muzzle in our hands for a few seconds, and keep it closed while saying "no". it might sounds harsh, but we really didn't hurt or abuse Lulu in any way.
We used to live in an apartment building with really thin walls, and knew that if Lulu barks a lot we would have major neighbor problems. So it was very important to make sure we don't have a chronic barker.
Lulu got it really quickly, and stopped barking. She, of course, still barks when someone is at the door, or when she hears a real loud and startling noise, or whenever the neighbor's cat tries to get into our yard. But it's in no way excessive or disturbing.
Hope this helps