The generation of magnetic fields in astrophysical bodies. II - The galactic field