hi
i created word file custom_template.docx in microsoft word and upload that in server and performed bellow code
$docx = new CreateDocxFromTemplate('custom_template.docx');
$wordStyles = array('<h1>' => 'Heading1' , '<h2>' => 'Heading2');
$html = '
<h1>Heading 1</h1>
<h2>Heading 2</h2>
';
$docx->embedHTML($html, array('wordStyles' => $wordStyles));
still it's not working i also tried below code
$docx = new CreateDocx();
$docx->importStyles('custom_template.docx', 'merge');
$wordStyles = array('<h1>' => 'Heading1' , '<h2>' => 'Heading2');
$html = '
<h1>Heading 1</h1>
<h2>Heading 2</h2>
';
$docx->embedHTML($html, array('wordStyles' => $wordStyles));