web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate "Popula...
Power Automate
Suggested Answer

Power Automate "Populate a Word Template" causing cumulative margin shift in repeating table rows

(1) ShareShare
ReportReport
Posted on by 16

I am using the Populate a Microsoft Word template action in Power Automate to generate certificates. My template uses a Repeating Section Content Control wrapped around a table row that contains the certificate layout (logo, name, date, etc., - Removed/hide for posting).

The Issue:
The first page (first record) renders perfectly. however, from the second page onwards, a cumulative "downward drift" occurs. The top margin appears to increase and the bottom margin decreases on every subsequent page, eventually pushing the content off the page.

What I’ve tried so far:

  • Set Table Properties: "Text Wrapping" is set to None (Inline).

  • Row Settings: Checked/Unchecked "Allow row to break across pages" (no change).

  • Spacing: Removed all extra paragraph markers (¶) and line breaks inside and outside the control.

  • Pagination: Applied "Page break before" on the first element of the repeating row.

  • Confirmed that the template is saved with Design Mode turned OFF.
     

Is there a hidden calculation in how the Word Online (Business) connector handles repeating row heights? How can I ensure every new page starts at the exact same vertical coordinate as the first?

Screenshot.png
Categories:
I have the same question (0)
  • Suggested answer
    Sunil Kumar Pashikanti Profile Picture
    2,318 Moderator on at
    Hi @patilm,
     

    What actually works (recommended solutions)

    Solution 1: One certificate per section (most reliable)

    Instead of repeating rows on the same document flow:

    1. Create a Section Break (Next Page) immediately after your certificate layout
    2. Place the repeating section inside the section
    3. Ensure each iteration lives in its own document section

    This forces Word to:

    • Reset margins
    • Reset headers and footers
    • Reset vertical layout position

    This is the only true reset mechanism Word respects.

    Solution 2: Repeat sections, not table rows

    Restructure your template so that:

    • The repeating section wraps a container block
    • The table is fully inside the repeating section
    • The repeating control is not attached to a row

    Preferred structure:

    • Repeating Section
      • Section Break (Next Page)
      • Table
        • Certificate layout 

    This dramatically reduces drift.

    Solution 3: Fixed table height for the certificate

    If every certificate is visually identical in height:

    • Set the table row height to Exactly
    • Ensure total height fits one page

    This eliminates reflow calculation entirely.

    This works best when:

    • Images are consistent size
    • No conditional content expands vertically

    Solution 4: Generate one file per record, then merge

    For high‑stakes documents like certificates:

    • Generate one Word or PDF per record
    • Merge afterward if needed

    Many production systems use this pattern because it avoids all Word pagination edge cases.

    Why this happens

    1. Word does not “reset” layout per repetition

    When Populate a Microsoft Word template expands a repeating section content control, Word treats the entire document as one continuous layout flow.

    Each iteration:

    • Re-evaluates table row height
    • Re-applies paragraph spacing
    • Re-applies internal table padding
    • Recalculates anchored objects (logos, shapes)

    Tiny rounding differences accumulate. By page two or three, those fractions add up, which is why you see:

    • Top margin slowly increasing
    • Bottom margin shrinking
    • Content drifting down page by page

    This is not visible when editing the template manually, only when rendered by the connector.

    2. Repeating table rows are especially fragile

    Wrapping a repeating section around a table row is the most problematic layout combination because:

    • Word must dynamically calculate row height
    • Images and shapes anchor slightly differently each time
    • Table cell padding gets compounded

    Even with:

    • Inline wrapping
    • No extra paragraph marks
    • Page break before
    • Fixed row height disabled

    …the recalculation still happens.

    3. Page breaks inside repeating controls are unreliable

    A “Page break before” inside a repeating row or embedded control does not behave as a hard reset.

    From Word’s perspective:

    • It is still one flowing object
    • The vertical cursor position is inherited
    • Margins are not reinitialized

    That is the core reason the drift compounds.

    What does NOT fix it (you already found this)

    You correctly ruled out all of the usual advice:

    • Text wrapping None
    • Allow row to break across pages
    • Removing paragraph marks
    • Design Mode off
    • Page break before

    None of these address the root problem.

    Why Microsoft has never fully fixed this

    The Word connector uses Word Online’s layout engine, not the desktop engine. That engine:

    • Is optimized for collaboration, not print‑perfect pagination
    • Does not guarantee deterministic layout for complex repeating structures
    • Has known limitations with tables, images, and repeating content

    This is not documented clearly, but it is longstanding behavior.

    Bottom line

    • There is no hidden setting you missed
    • The drift is caused by cumulative layout recalculation
    • Repeating table rows combined with pagination will always be brittle
    • Section breaks or one‑record‑per‑document are the only dependable fixes
    ✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
    👍 Feel free to Like the post if you found it useful.

    Sunil Kumar Pashikanti, Moderator
    Blog:
     https://sunilpashikanti.com/posts/
     
  • Valantis Profile Picture
    6,735 on at
    Hi @patilm,
     
    Sunil's breakdown is spot on. The cumulative drift is a known limitation of how the Word Online connector handles repeating sections and there's no hidden setting that fixes it. The one-record-per-document approach is the most reliable for certificates specifically since layout precision matters.

    Did you get a chance to try any of the suggested solutions? Would be good to know which one worked for your use case.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

  • Valantis Profile Picture
    6,735 on at

    Hi @patilm,

    Just wanted to check in and see if everything is working now. If you still need any help, feel free to let me know.

    Also, if the issue is resolved, it would be great if you could mark the answer as solved so others with the same question can find it easily.

     

    Thanks and have a great day!

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard