depends on the dog... most of the time, when vets tell people to do it at home, they show them how to do it from the outside... not always as effective, but much more plesent for the dog (not that anals are ever plesent). Dogs tend to put up with this a lot better than they do when the vet actually sticks their finger inside to "milk" the glands. I've never had a problem with my dog, other than, ironically, when he basically got so stressed out at the vet that he squirted anals everywhere... and then w/in the next week ended up with an abscess, that ended up rupturing... poor boy... but since then... we've lucked out, and havent had any more problems.
to get back to the question, if your dog needs its anal glands done, and wont let you do it at home, bring it to the vet, where they have more people qualified to express them, and with more experience at holding dogs that arent wanting their glands expressed...
and just cuz i love this picture, i figured i'd let you see what an anal gland abscessed dog looks like during the healing process:

yes, that IS the most pathetic face ever...