Magnetic field in active regions of the sun at coronal heights