The error message is caused by code trying to do something with an object that doesn't exist. You haven't posted any code so we can't guess what this object might be.
The .docx file format doesn't/shouldn't contain any code.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|