Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

Document is gray when opening specifically for 2 page docs. #105

@pmar0

Description

@pmar0

Expected Behavior

I make a 2 page document using merge_templates and it opens normally.

Current Behavior

Currently, I can generate the document fine and open it to a gray screen. I can then get the screen to come up by pressing Alt+F9 or clicking the screen a few times. I think the alt+f9 just gives it a refresh vs any actual correlation to the issue. This specifically happens with documents of 2 pages only, that I've found. I've tested 1 page, 3 pages, and pages in the 100s and that all loads normally..so weird, haha.

Possible Solution

I'm guessing it's some tweak that needs to happen with the rebuilding of the XML in the merge_templates function. I'm going to look into it a little bit myself.

Steps to Reproduce (for bugs)

  1. Create any test data for a merge_templates that has 2 items, so it results in 2 pages
  2. Open the 2 page doc and observe the lovely gray screen
  3. Press Alt+F9 to fix it, then press again to turn the functionality of alt+f9 off
  4. I used the separator of newPage_section and now also just tested with page_break and got the same result.

Context

Just making some labels and came across this issue. Checked to make sure my added function wasn't causing the issue and I found that it wasn't; the current merge_templates has the same issue.

Your Environment

  • Python version: 3.9.6
  • docx-mailmerge version: 0.5.0
  • Microsoft 365 version 2202

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions