Gravitational microlensing is a powerful tool allowing one to probe the structure of quasars on sub-parsec scale. We report recent results, focusing on the broad absorption and emission line regions. In particular microlensing reveals the intrinsic absorption hidden in the P Cygni-type line profiles observed in the broad absorption line quasar H1413+117, as well as the existence of an extended continuum source. In addition, polarization microlensing provides constraints on the scattering region. In the quasar Q2237+030, microlensing differently distorts the H$\alpha$ and CIV broad emission line profiles, indicating that the low- and high-ionization broad emission lines must originate from regions with distinct kinematical properties. We also present simulations of the effect of microlensing on line profiles considering simple but representative models of the broad emission line region. Comparison of observations to simulations allows us to conclude that the H$\alpha$ emitting region in Q2237+030 is best represented by a Keplerian disk.