code: private String adjustHtml(String htmlInput) {
  
          // check if we have some opening and closing HTML tags
          if ((htmlInput.toLowerCase().indexOf("<html>") == -1) && (htmlInput.toLowerCase().indexOf("</html>") == -1)) {
              // add a correct HTML tag for word generated HTML
              StringBuffer tmp = new StringBuffer();
              tmp.append("<html xmlns:o=\"\"><body>");
              tmp.append(htmlInput);
              tmp.append("</body></html>");
              htmlInput = tmp.toString();
          }
          return htmlInput;
      }
docs: Adjusts the HTML input code in WORD mode if necessary.<p>
  
  When in WORD mode, the HTML tag must contain the xmlns:o="urn:schemas-microsoft-com:office:office"
  attribute, otherwise tide will not remove the WORD tags from the document.
  
  @param htmlInput the HTML input
  @return adjusted HTML input