Controlling the magnetic anisotropy in ultrathin metallic films door