com.elovirta.ooxml icon indicating copy to clipboard operation
com.elovirta.ooxml copied to clipboard

Custom template generates invalid docx

Open dagoss opened this issue 7 years ago • 1 comments

I'm attempting to use a custom docx file for the dotx.file.

I'm not getting any build errors, but the resulting file is considered corrupt by Word 2013 (I can still open it in LibreOffice Writer, and the content is there).

I've attached the template used during transformation and the resulting document. If I switch the template back to the Normal.docx that comes with this plugin, everything works fine. I suspect there is some undocumented requirement for the template that mine isn't adhering to.

result.docx Custom_Template.docx

dagoss avatar Mar 31 '17 16:03 dagoss

I should add that I did find a workaround, by making my template the template for Document.docx, and then removing it as a template.

  1. Make a copy of Document.docx that comes with this plugin
  2. Open the copy in Word
  3. On the Developer Tab, click ** Document Template**
  4. Click Attach, and select the template that isn't working
  5. Select Automatically update document styles
  6. Click Ok
  7. Open the Document Template settings again
  8. Deselect Automatically update document styles
  9. In the Document Template box, type Normal
  10. Click OK

This was a one-time thing, so not a big deal, but it would probably be nice to figure out what was wrong with the template I used in the first place (since it was created from a clean Normal.dotx that came with Word 2013)

dagoss avatar Mar 31 '17 17:03 dagoss