What I do is if a pup looks like he's about to jump, at the first sign of intention, the first muscle contraction, I tell him, "sit," (assuming your pup knows sit) Then I give a little treat and quiet praise. While he's beginning to learn this, I'll even squat down to his level, turn him broadside across my chest and hug him close to me while I give him attention so he doesn't feel the need to leap up to greet me. If he manages to jump up before I notice in order to give him an alternative, I'll turn sideways and ignore him....not speak, look at, do anything. Just absolutely ignore him. He will then, since it's not working, get back on all fours, at which time, I'll immediately turn to him, squat down and love him up, scratch behind his ears, give him a little treat. EVERYONE who interacts with him must be instructed to do the same. Tell your friends before they come over that you're trying to train your pup and will they help you by.........If you're consistant and keep it up, he will eventually learn what behavior gives him what he wants and what behavior does not. Remember to always think what is it the dog wants? In this case, it's your attention. That's the reinforcer. A treat is a bonus to further make the desireable behavior reinforced. The more reinforcements he gets for a behavior, the more likely that behavior will be repeated. You don't need to punish the jumping up because if he does not get anything good from jumping up, that behavior will extinguish on it's own. Keep at it. This behavior has been working for him up to now or it wouldn't exist. So, he's going to keep trying for a while. Consistancy and showing a real contrast to him (jumping up gets him nothing. Staying on all fours gets him everything he wants) will solve your problems with jumping.