Presenting oneself to receive Holy Communion should be a conscious decision, based on a reasoned judgment regarding one’s worthiness to do so, according to the Church’s objective criteria, asking such questions as: “Am I in full communion with the Catholic Church? Am I guilty of grave sin? Have I incurred a penalty (e.g. excommunication, interdict) that forbids me to receive Holy Communion? Have I prepared myself by fasting for at least an hour?” The practice of indiscriminately presenting oneself to receive Holy Communion, merely as a consequence of being present at Mass, is an abuse that must be corrected (cf. Instruction “Redemptionis Sacramentum,” nos. 81, 83).
The Church teaches that abortion or euthanasia is a grave sin. The Encyclical Letter Evangelium vitae, with reference to judicial decisions or civil laws that authorize or promote abortion or euthanasia, states that there is a “grave and clear obligation to oppose them by conscientious objection. […] In the case of an intrinsically unjust law, such as a law permitting abortion or euthanasia, it is therefore never licit to obey it, or to ‘take part in a propaganda campaign in favour of such a law or vote for it’” (no. 73). Christians have a “grave obligation of conscience not to cooperate formally in practices which, even if permitted by civil legislation, are contrary to God’s law. Indeed, from the moral standpoint, it is never licit to cooperate formally in evil. […] This cooperation can never be justified either by invoking respect for the freedom of others or by appealing to the fact that civil law permits it or requires it” (no. 74). . . .
. . . [N.B. A Catholic would be guilty of formal cooperation in evil, and so unworthy to present himself for Holy Communion, if he were to deliberately vote for a candidate precisely because of the candidate’s permissive stand on abortion and/or euthanasia. When a Catholic does not share a candidate’s stand in favour of abortion and/or euthanasia, but votes for that candidate for other reasons, it is considered remote material cooperation, which can be permitted in the presence of proportionate reasons.]
— This is from a memorandum written by then-Cardinal Ratzinger and made public in the first week of July 2004.