A copper(II) octacyanotungsten(V)-based ferromagnet, CuII3[WV(CN)8]2(pyrimidine)2·8H2O, was prepared. This magnetic material can reversibly adsorb and desorb n-propanol vapor and shows reversible variations in the crystal structure and magnetic properties. These changes are due to the coordination geometry switching of CuII between 6-coordinate and 5-coordinate.