Recent results of two observation campaigns (October 2002 and October 2003) are presented with the objective of understanding the onset of flares and CMEs. The magnetic field was observed with THEMIS and MDI, the chromosphere with the MSDP operating on the German telescope VTT and on THEMIS, the EUV images with SOHO/CDS and TRACE, the X-ray with RHESSI. We show how important is the magnetic configuration of the active region to produce CMEs using two examples: the October 28 2003 X 17 flare and the October 22 2002 M 1.1 flare. The X 17 flare gave a halo CME while the M 1.1 flare has no corresponding CME. The magnetic topology analysis of the active regions is processed with a linear-force-free field configuration.