To investigate statistically whether magnetic fields in massive stars are ubiquitous or appear in stars with specific spectral classification, certain ages, or in a special environment, we acquired 41 new spectropolarimetric observations for 36 stars. Among the observed sample roughly half of the stars are probable members of clusters at different ages, whereas the remaining stars are field stars not known to belong to any cluster or association. Spectropolarimetric observations were obtained during three different nights using the low-resolution spectropolarimetric mode of FORS2 (FOcal Reducer low dispersion Spectrograph) mounted on the 8-m Antu telescope of the VLT. To assess the membership in open clusters and associations, we used astrometric catalogues with the best currently available kinematic and photometric data. A field at a significance level of 3sigma was detected in ten O-type stars. Importantly, the largest longitudinal magnetic fields were measured in two Of?p stars: <B_z>=-381+-122G for CPD-282561 and <B_z>=-297+-62G for HD148937, previously detected by us as magnetic. The obtained observations of HD148937 on three different nights indicate that the magnetic field is slightly variable. Our new measurements support our previous conclusion that large-scale organized magnetic fields with polar field strengths in excess of 1kG are not widespread among O-type stars. Among the stars with a detected magnetic field, only one star, HD156154, belongs to an open cluster at high membership probability. According to previous kinematic studies, four magnetic O-type stars in the sample are well-known candidate runaway stars.