Chemical treatment or coating of shaped articles made of macromolecular substances