Hidden text paragraphs impact format of the following non hidden paragraph

Patrick Bourdon 40 Reputation points
2026-08-09T12:07:36.6833333+00:00

This change is recent.

I am a teacher an I am been using hidden text for long to include answers in homework or assessments for students. This way, I include the exam questions and the answers in the same document. By choosing whether or not to display hidden characters and hidden paragraphs, I can easily generate the exam questions and the answer key as PDF files.

For some time now, the exam questions (where hidden characters do not appear) are not formatted correctly.

After some tests, the reason is as follows:

If a non-hidden paragraph is preceded by one or more hidden paragraphs (whose paragraph marks are hidden), then the indentation values of the non-hidden paragraph are altered. The indentation values then become those of the first hidden paragraph following the last preceding non-hidden paragraph.

I haven’t found a solution to this problem, and it’s very, very annoying.

Microsoft 365 and Office | Word | For business | Windows

Answer accepted by question author
Aetherin 1,705 Reputation points Independent Advisor
2026-08-09T13:32:13.1666667+00:00

Hi @Patrick Bourdon,

First, just a quick note that I'm a fellow community member and not a Microsoft representative. I'd be glad to discuss this with you and learn a bit more about what you're experiencing. If I happen to come across anything that may be helpful, I'll be happy to share it. Hopefully, together we can gain a better understanding of the behavior you're seeing.

On my side, I'm currently using the Word version shown below, and after trying to recreate the scenario involving hidden and visible paragraphs, the document appears to behave as expected.

User's image User's image User's image

With that in mind, would you mind sharing a few additional details about your setup and what you're observing:

  • What exact version and build of Word are you currently using?
  • Does the indentation issue only appear after you hide the hidden text, or is the formatting already incorrect even when the hidden paragraphs are visible in the document?
  • Does the problem occur in all documents, or only in a specific document/template? If you create a brand-new document with a few hidden and visible paragraphs, can you reproduce the issue?
  • Could you try opening Word in Safe Mode and check whether the issue still occurs? Press Windows + R, type winword /safe, and then open or recreate the document to test the behavior.
  • Does the same issue occur if you open the document in Word for the web or on a different computer?

I look forward to your response and any additional findings you can share. Thank you for taking time.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer recommended by moderator
Charles Kenyon 170.7K Reputation points Volunteer Moderator
2026-08-10T19:22:01.1366667+00:00

I tested your document and observe the problem. In your document making the paragraph mark in the hidden paragraph not hidden made no difference.

I am not able to reproduce the problem in a new document.

I tried pasting the entire content of your document into a new blank document. The problem did not appear there.

I pasted everything except the last paragraph mark.

Recommendation:

  1. Create a new blank template.
  2. Copy your styles into that template using the Organizer.
  3. Save the template.
  4. Create a new document based on the template and copy the content of your problem document into that new document except for the last paragraph mark.

Was this answer helpful?

2 people found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Aetherin 1,705 Reputation points Independent Advisor
    2026-08-10T13:19:39.5333333+00:00

    Hi @Patrick Bourdon,

    Based on my experience and what I see in your file, the issue does not appear to be caused by hidden text itself. Instead, it seems related to the custom paragraph styles used for the answer/correction sections, which have their own hidden and indentation settings. When those hidden paragraphs are suppressed, the following visible paragraph may inherit or be affected by their indentation.

    Looking at the document structure, the answer styles (Corrig, Corrig-Court, and Corrig-SQL) are configured with the Hidden (w:vanish) attribute in the style definition. The first hidden answer paragraph also carries its own indentation and numbering settings, which appears to influence the formatting of the next visible paragraph.

    As a test, I opened the sample you provided and:

    • Opened the Styles pane.
    • Located the Corrigé style.

    User's image

    • Right-clicked the style and selected Modify.

    User's image

    • Went to Format > Paragraph and temporarily set: Left indent: 0, Right indent: 0, Special: None

    User's image User's image

    • Saved the changes.
    • Selected the first answer line (·Gestion des accès aux données (confidentialité, RGPD)) and pressed Ctrl + Q to reset any direct paragraph formatting back to the style defaults.

    User's image

    After making these changes, the indentation behavior appeared much more consistent on my side.

    User's image

    Could you give this a try and let me know whether it improves the formatting in your document as well?

    Looking forward to your response.

    Was this answer helpful?

    2 people found this answer helpful.

  2. Patrick Bourdon 40 Reputation points
    2026-08-15T08:00:55.7533333+00:00

    Hello,

    I just found an easy way to reproduce the issue from scratch.

    Create a new docx file.

    1. Insert two text paragraphs: "Lorem ipsum ....".
    2. Insert in between an hidden paragraph that is indentetd and that contains an equation.

    User's image

    The second text paragraph is now indented when hidden text is not displayed.

    User's image

    But this also appends in other situations.

    Was this answer helpful?

    1 person found this answer helpful.

  3. Patrick Bourdon 40 Reputation points
    2026-08-10T08:38:11.8233333+00:00

    User's image

    When hidden text is visible.

    User's image

    When not visible, paragraphs starting with a red X moved.

    User's image

    The problems occur on a bunch of file which are built from the same template (i.e. same set of styles).

    Note: if you copy/paste the entire short file I provided in a new file, then the issue disappears but formatting is different (aptis instraed of calibri...). I did not try yet with bigger files.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.