Many times, people vote for a pro-abort politician because they agree with their views on abortion. If Catholics are okay with abortions, then they spout heresy and excommunicated.
As someone noted above, the only excommunication directly linked to abortion that I know about is about procurement of abortion. This would mean the person getting the abortion and anyone formally cooperating or perhaps just directly materially cooperating with the abortion process, like paying for the abortion.
Voting for a pro-abortion politician is neither formal cooperation nor direct material cooperation, but remote material cooperation, and thus it is not intrinsically evil, but to do it morally sevaral conditions must be met.
Namely, you must be cooperating with the evil despite the evil, not because of it, and the good hoped to be gained from the action bust outweigh the bad. Thus a Catholic could vote for a pro-abortion candidate (like any major-party presidential candidate in the last several presidential elections) if they were voting for them in spite of their support for abortion not because of it, and if the good they hoped would come about from that election would outweigh the evil of abortion. One easy example, when a moderately pro-abortion candidate like John McCain ran against an intensely pro-abortion candidate like Barack Obama, one could vote for McCain not because he was pro-abortion but because he was less pro-abortion than Obama).
In the case of a Catholic who voted for a pro-abortion politician
because he was pro-abortion, as if this were a good thing, I think you definitely seem to have a case of sin there, very likely mortal sin because of the gravity of the subject. However, it would be hard to prove that this sin also involved formal heresy of the sort that incurs automatic excommunication. You would have to prove that in this particular case the idea in question (that abortion should be illegal, I suppose) has been infallibly defined by the Magisterium as having been divinely revealed, and that the post-baptismal denial or doubt of this truth is obstinate. Generally we ordinary laypeople are not in a position to make such determinations.