The practice of this artificial fertilization, since it is a question of man, cannot be considered neither exclusively, nor even mainly, from the biological and medical point of view, leaving aside that of morality and law.
Artificial fertilization, outside of marriage, is to be condemned outright as immoral. Such is indeed the natural law and the positive divine law, that the procreation of a new life can only be the fruit of marriage. Marriage alone safeguards the dignity of the spouses (mainly the woman in this case), their personal property. By itself, only it provides for the good and education of the child. Consequently, on the condemnation of artificial fertilization outside the conjugal union, no difference of opinion is possible between Catholics. A child conceived under these conditions would, by the very fact, be illegitimate.
Artificial fertilization in marriage, but produced by the active element of a third party, is also immoral and, as such, to be condemned without appeal. Only the spouses have a reciprocal right over their body to engender a new life, an exclusive, non-transferable, inalienable right. And that must also be taken into consideration of the child. To anyone who gives life to a small being, nature imposes, by virtue of this bond, the burden of its conservation and education. But between the legitimate husband and the child, the fruit of the active element of a third party (the spouse was he consenting), there is no bond of origin, no moral and legal bond of conjugal procreation.
As for the lawfulness of artificial fertilization in marriage, it suffices for us, for the moment, to recall these principles of natural law: the simple fact that the result to which we aim is achieved by this route, does not justify the use of the medium itself; nor the desire, in itself very legitimate among spouses, to have a child, is not enough to prove the legitimacy of the recourse to artificial fertilization, which would fulfill this desire.
Let it not be forgotten: only the procreation of a new life according to the will and the plan of the Creator carries with it, to an astonishing degree of perfection, the achievement of the aims pursued. It is, at the same time, in conformity with the bodily and spiritual nature and with the dignity of the spouses, with the normal and happy development of the child.
All is an Excerpt: Speech of Pope Pius XII to Catholic Doctors in Rome for their 4th International Congress (Sept. 29, 1949), Acta Apostolicae Sedis 49