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 / Hiding Sections of a W...
Power Automate
Unanswered

Hiding Sections of a Word Document

(1) ShareShare
ReportReport
Posted on by 2
Is it possible to hide sections of a word document using data from a SQL stored procedure.
 
So simply hide section when Field01 = TRUE
Categories:
  • trice602 Profile Picture
    16,679 Super User 2026 Season 2 on at
    Hi,
     
    I haven't tried this yet but from what I have found, this should work.
     
    CREATE PROCEDURE GetSectionVisibility
    AS
    BEGIN
    SELECT Field01 = CAST(1 AS BIT) -- Example: 1 (TRUE) means section should be hidden
    END
     

    1. Prepare the Word Document with Content Controls

    1. Open your Word document.
    2. Add content controls to the sections you want to conditionally hide.
      • Go to the Developer Tab in Word (enable it via Word Options if not already visible).
      • Insert Rich Text Content Controls or Plain Text Content Controls around the sections to hide.
      • Assign unique titles or tags to these controls (e.g., Section1, Section2).

    2. Create a SQL Stored Procedure

    • Write a stored procedure that returns a result set with the field you want to check (e.g., Field01).

    ------------------------------------------------

     

     

    ⭐ If this was helpful, please like and mark as a verified answer to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard