My shihtzu is eleven months old, reasonable in most areas, but gets over-excited when encountering people. Out on the leash I sense he is constantly watching for such meetings. A car door clicks and he becomes alert. Out for a walk and seeing a stranger approach he pulls on the lead and if the stranger walks past--that's fine. He might look back at them ruefully. But should they stop to pet him he has to be tightly restrained to prevent him jumping up at the stranger. How do you demand a stranger not to make a fuss of him without seeming abrupt?
When allowed to run free on an open field his response to recall is quite good. But if a stranger appears he will run in that direction and all previously good recall is forgotten. This reaction is also prevalent with other dogs---all very playful, but can be annoying, when he will run away 100 metres or so to make the encounter.
People coming into the house had similar reactions but we are overcoming that by leashing him for a few minutes until his excitement subsides. I noticed a separate message on the forum about this aspect of behavious which has been helpful.