It is also worth it to remember that in the Catholic Church not all the excommunications need to be explicitly pronounced by the Church; certain actions produce excommunication latae sententiae, that's to say, automatic. Among these actions are abortion (when it works), joining the freemasons, profanation of the Host, and becoming a heretic.
Only the Vatican can institute an excommunicatio latae sententiae; on the 1st of July 1949 Pope Pius XII excommunicated all the Communists; here it is, in the official Latin (with my translation). The format is question-answer:
Q. 1 - Utrum licitum sit, partibus communistarum nomen dare vel eisdem favorem praestare.
Q. 1 - Whether it is acceptable to enroll in communist parties and to support them.
R. Negative: Communismum enim est materialisticus et antichristianus; communistarum autem duces, etsi verbis quandoque profitentur se religionem non oppugnare, se tamen, sive doctrina sive actione, Deo veraeque religioni et Ecclesia Christi sere infensos esse ostendunt.
A. No: as a matter of fact, Communism is materialistic and antichristian; additionally, the chiefs of the communists even if they claim that they do not oppose religion, clearly show, with actions and words, to be against God, the true religion and the Church of Christ.
...I have omitted question 2, about the press, and point 3, that excludes communists from sacraments...
Q. 4 - Utrum Christifideles, qui communistarum doctrinam materialisticam et anti Christianam profitentur, et in primis, Qui eam defendunt vel propagant, ipso facto, tamquan apostatae a fide catholica, incurrant in excommunicationem speciali modo Sedi Apostolicae reservatam.
Q. 4 - Whether Christians, professing the materialistic and antichristian doctrine of the communists, and first of all those that defend it or diffuse it, because of the action itself, incur in the excommunication that is specifically reserved to the Apostolic Seat.
R. Affirmative
A. Yes.
As you can see, the wording is quite clear: ipso facto, a terse ablative meaning "due to the fact itself". No need to excommunicate all those people one by one; this decree excommunicates all.