I am not clear about your purpose. Could you explain more about your user scenario?
If you just want to convert .dotx file to .docx file, you may refer to this
Hope you elaborate what you are doing and what you plan to do, thanks.
The example you reffered above for converting the dotx into docx, is not working, do you have some other references?