afiPart.setBinaryData(paramValue.toString().getBytes());
afiPart.setContentType(new ContentType("text/html"));
Relationship altChunkRel = wordPackage.getMainDocumentPart().addTargetPart(afiPart);
CTAltChunk ac = Context.getWmlObjectFactory().createCTAltChunk();
ac.setId(altChunkRel.getId());
R run = (R) text.getParent();
run.getContent().add(ac);
text.setValue("");
wordPackage.getContentTypeManager().addDefaultContentType("html", "text/html");
} catch (Exception e) {
throw new ReportFormattingException("An error occurred while inserting html to docx file", e);
}