Has you tried Rex::zip ? just asking. When Rex library can be used, it's always preferred. Not sure if you tried and it doesn't allow to generate docx file. In that case, would be nice to listen which difficulties where found :)