The answer, in one word: ivermectin. It can be used (in proper doses) for all sorts of worms, including heart worms. As a breeder, we use it, as it is cheap, can be purchased at feed stores, and it works. One $40 bottle of injectable ivermecin will last us over a year (with approximately 30 dogs at any one time). If you are curious about this, just ask your vet about the proper dosage (I cannot remember, as my wife actually does the monthly worming).
I used to use Ivermectin also when I had a lot of dogs, however a word of caution. Some herding dogs, especially collies and I think border collies (but maybe some others) may be sensitive to it. Proceed with caution (and as LaRueLaDue said, speak to your Vet).
cattle dosage per weight