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:
I have the same question (0)
  • trice602 Profile Picture
    16,016 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard