You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.
My template document has a text box. The original document was an invitation in which the text box was used to mark the margin to cut them into the right size and to also specify a background image.
Current behavior
Generating the merge files seems to go ok and the final document has all the expected text. However, MS Word 2016 complains when first opening it:
Word found unreadable content in <...>.docx. Do you want to recover the contents of this document? If you trust the source o this document, click Yes.
The document is generated using MailMerge.merge_pages(...), e.g.:
Hopefully that warning is not serious. Nonetheless, it should be investigated to see if the generated file is not broken or if we are getting lucky and Word manages to rebuild it.
Steps to Reproduce (for bugs)
Download testcase.zip (link) and unzip in a file locally. The zip file contains testcase.docx and testcase.py.
Run python testcase.py. Obviously this python instance should have docx-mailmerge installed.
Open testcase_generated.docx with Word 2016
The warning message should pop up immediately and block the whole MS Word window.
Environment
Python 3.7 on Cygwin
docx-mailmerge 0.4.0 (I just installd it fresh)
MS Word 2016 32 bits
Thank you !
The text was updated successfully, but these errors were encountered:
When using this feature, make sure you don't use comments, footnotes, bookmarks, etc. This is because these elements have an id attribute, which must be unique. This library does not handle this, resulting in invalid documents.
Hi,
This is indeed related to text boxes, witch may have anchors, position, etc ; they are not managed by the merge_pages def.
Note that the documentation you quoted refers to a version not released yet by @Bouke. However, this version (def merge_pages replaced by def merge_templates) will not managed either text boxes for the same reasons.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi.
Context
My template document has a text box. The original document was an invitation in which the text box was used to mark the margin to cut them into the right size and to also specify a background image.
Current behavior
Generating the merge files seems to go ok and the final document has all the expected text. However, MS Word 2016 complains when first opening it:
The document is generated using
MailMerge.merge_pages(...)
, e.g.:Expected Behavior
Hopefully that warning is not serious. Nonetheless, it should be investigated to see if the generated file is not broken or if we are getting lucky and Word manages to rebuild it.
Steps to Reproduce (for bugs)
testcase.docx
andtestcase.py
.python testcase.py
. Obviously this python instance should havedocx-mailmerge
installed.testcase_generated.docx
with Word 2016Environment
Thank you !
The text was updated successfully, but these errors were encountered: