I think it needs to be given orally in order to work best for heartworms and other worms. I've given it on a slice of bread or in a hot dog piece, and they usually eat it right down.
If you only have a few dogs, I have ordered Ivermectin in pill form from this Australian company --
http://www.pets-megastore.com.au/hea...c-165_160.html
Not as cheap as the cattle wormer liquid but easier to give the pill. I usually buy the Valuheart or the Vetaheart pills --
http://www.pets-megastore.com.au/val...r25bugogsv7cb5
http://www.pets-megastore.com.au/vet...5_160_309.html