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

Notifications

Announcements

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
    15,402 Super User 2025 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard