The Gauss-type exchange contact potential is applied to derive the Ruderman-Kittel-Kasuya-Yosida interaction in thin films. The interlayer magnetic coupling energies and the critical Curie/Néel temperatures are calculated. The quantum size effects are found to cause long-range oscillatory behavior of these quantities vs. film thickness, with the period much longer than the usual RKKY characteristic oscillations.