This paper reports on two new technical developments concerning sample environments for X-ray magnetic circular dichroism (XMCD). The first measurements under high pressures of up to 30 GPa are described. The difficulties of combining the techniques of high pressure and XMCD are commented on. The second development involves the use of a fast-switching magnetic field. A new superconducting device is used to perform XMCD measurements on paramagnetic compounds in magnetic fields of up to 6 T. The small amplitude of the XMCD signal imposes, for a given signal-to-noise ratio, a noise less than a few 10(-5). The signal-to-noise ratio is improved by the use of a series of acquisitions, switching the magnetic field between each acquisition. A very fast switching mechanism has been built based on mechanical rotation of a superconducting coil, with the sample kept in place inside the coil. The XMCD signals at the L(II,III)-edges of paramagnetic rare-earth compounds have been measured at 4.5 K in fields of up to 6 T with a switching time of 11 s.