I went to a sheltie breeder who had his dogs debarked. It pained me to hear their little squeaks. But anyway, totally agree that teaching your dog to bark and then to be quiet is a good way of having some control over the yapping!
I also love the pennies in a can (put 10-15 coins in an empty coke can and seal up the hole) for when Romeo gets into a barking frenzy. I give it a shake and say "Quiet" (or whatever command you use to get the dog to clam up) to reinforce the "quiet" command. The rattling snaps the dog out of his crazy barking, and you can praise/treat immediately after coz the dog is now quiet!
I read that you think your pup is barking for attention. Most dogs do but you must make sure not to let them train YOU into giving them attention when they do bark! I don't actually think giving the "quiet" command works well in this case. I would actually use time outs - this instills in them (esp from puppyhood) that they get attention only when they are nice and quiet.
If you feel your pup is barking just to get you to pay attention to her, you pick her up and put her in a time out place (usually a small room with nothing much in it - like a loo) and close the door. She might howl the house down for awhile but you stay strong! Don't say anything to her, don't look at her (negative attention is STILL attention, tho' it's unlikely she can see you through the door! haha!

Just note this if you're putting her in a playpen where she CAN see you).
Let her scream all she wants (it might take a couple of repetitions for her to "get it" but she will!) - sometimes what happens is she might bark harder and louder/longer especially if this was something that worked for her before. She'll give up eventually. When she does, count to 30 and open the door and praise and treat and let her enjoy your company. If she barks for attention again, into the time out place she goes for another round. Time outs should be for as long as she barks inside the time out place + 30 secs. Or if she is quiet in the time out place (having learnt it's punishment), 2 to 3 mins is sufficient.
Pups crave social interaction, so time outs work very well esp if they get alot of love and praise and treats when they are with you. Be consistent with it and you'll see results.
You can concurrently teach the bark/quiet for use in other situations, like barking when there are people at the door, etc.