Transmission spectroscopy during planetary transits, which is based on the measurements of the variations of the planet-to-star radius ratio as a function of wavelength, is a powerful technique to study the atmospheric properties of transiting planets. One of the main limitations of this technique is the effects of stellar activity, which up until now, have been taken into account only by assessing the effect of non-occulted stellar spots on the estimates of the planet-to-star radius ratio. In this paper, we study the impact of the occultation of a stellar spot and plage on the transmission spectra of transiting exoplanets for the first time. We simulated this effect by generating a large number of transit light curves for different transit...