We investigate the superconducting transition temperature T-c of epitaxial ferromagnet/superconductor/ferromagnet (FSF) triple layers with perpendicular magnetic anisotropy. Due to the different coercive fields of the top and bottom F layers (F=[Co/Pt] multilayer) different magnetized states can be achieved: a fully magnetized state where the F layer magnetizations are parallel oriented, a state DM where one layer is demagnetized, and a state DD where both layers are demagnetized. T-c is maximum in the fully magnetized state and decreases consecutively from the DM to the DD state due to the different contributions from magnetic stray fields originating from the domain walls present in the demagnetized layers. The role of the proximity effect and the effect of the stray fields on the superconductivity in the S layer can be distinguished by analyzing the temperature dependence of the upper critical field and by comparison with data taken on an FISIF multilayer where I is an insulating SiO2 barrier. Hence, we demonstrate that T-c can be manipulated by the intentional creation of different stray-field configurations in the F layers.