>If these are DOCX document types, then these are XML files within a ZIP file (the DOCX file is actually a ZIP file). You can extract the XML and do direct replacement and completely stop the automation approach.
Although that is true, understanding and using OOXML is not a trivial task IMHO. Automation works fine.