Hello,
Please write to contact[at]phpdocx.com and we'll help you with your issues. Please send to this email address a small script that illustrates your issues (without doing external connections such as databases or webservices) and the DOCX output you get after running the script.
Also please check that Tidy is installed and running on your server before using any HTML method (embedHTML and replaceVariableByHTML).
Regards.