The 1917 Code of Canon Law explicitly declared that joining Freemasonry entailed automatic excommunication, and banned books favouring Freemasonry.
What law banned books favoring Freemasonry?
The 1917 Code of Canon Law