This is not a matter of canon law. The GIRM provides the guidelines for the Liturgy. For the Eucharistic Prayer, the following paragraphs are contained in the GIRM.
The celebrant of the Mass determines which option to use.
- The numerous Prefaces with which the Roman Missal is endowed have as their purpose to bring out more fully the motives for thanksgiving within the Eucharistic Prayer and to set out more clearly the different facets of the mystery of salvation.
- The choice between the Eucharistic Prayers found in the Order of Mass is suitably guided by the following norms:
a) Eucharistic Prayer I, or the Roman Canon, which may always be used, is especially suited for use on days to which a proper text for the Communicantes (In communion with those whose memory we venerate) is assigned or in Masses endowed with a proper form of the Hanc igitur (Therefore, Lord, we pray) and also in the celebrations of the Apostles and of the Saints mentioned in the Prayer itself; likewise it is especially suited for use on Sundays, unless for pastoral reasons Eucharistic Prayer III is preferred.
b) Eucharistic Prayer II, on account of its particular features, is more appropriately used on weekdays or in special circumstances. Although it is provided with its own Preface, it may also be used with other Prefaces, especially those that sum up the mystery of salvation, for example, the Common Prefaces. When Mass is celebrated for a particular deceased person, the special formula given may be used at the proper point, namely, before the part Remember also our brothers and sisters.
c) Eucharistic Prayer III may be said with any Preface. Its use should be preferred on Sundays and festive days. If, however, this Eucharistic Prayer is used in Masses for the Dead, the special formula for a deceased person may be used, to be included at the proper place, namely after the words: in your compassion, O merciful Father, gather to yourself all your children scattered throughout the world.
d) Eucharistic Prayer IV has an invariable Preface and gives a fuller summary of salvation history. It may be used when a Mass has no Preface of its own and on Sundays in Ordinary Time. On account of its structure, no special formula for a deceased person may be inserted into this prayer.