Physical and chemical variations within the W3 star-forming region. II. The 345 GHz survey