Anomalous microwave emission (AME) has been previously studied in two well-known molecular clouds and is thought to be due to electric dipole radiation from small spinning dust grains. It is important to measure the polarization properties of this radiation both for component separation in future cosmic microwave background (CMB) experiments and also to constrain dust models. We have searched for linearly polarized radio emission associated with the ρ Ophiuchi and Perseus molecular clouds using WMAP 7-year data. We found no significant polarization within an aperture of 2° diameter. The upper limits on the fractional polarization of spinning dust in the ρ Ophiuchi cloud are 1.7, 1.6 and 2.6 per cent (at 95 per cent confidence level) at K, Ka and Q bands, respectively. In the Perseus cloud we derived upper limits of 1.4, 1.9 and 4.7 per cent, at K, Ka and Q bands, respectively; these are similar to those found by López-Caraballo et al. If AME at high Galactic latitudes has a similarly low level of polarization, this will simplify component separation for CMB polarization measurements. We can also rule out single domain magnetic dipole radiation as the dominant emission mechanism for the 20–40 GHz. The polarization levels are consistent with spinning dust models.