Skip to main content

Notifications

Community site session details

Community site session details

Session Id : +x05Zedrf8grMDBbu/wyiv
Power Automate - Building Flows
Answered

Conditional Text Formatting for Word Template

Like (0) ShareShare
ReportReport
Posted on 4 Nov 2024 13:11:08 by 150

Is it possible to generate values in color and bold text when populating a Word template and converting the file to PDF? I have three conditions:

  1. If the value is 'BDL,' it should appear in plain text.
  2. If the value is 'LCM,' it should be green and bold.
  3. If the value is 'LOP,' it should be red and bold.

I’ve created a template with a table in a repeating section content control.

  • kiran_g Profile Picture
    150 on 05 Nov 2024 at 11:14:40
    Conditional Text Formatting for Word Template

    I can't share screenshots, but I can explain step-by-step. In my scenario, on the Word template, I have a column (Status) where I need the text color to change based on the status value:

    1. I created three different controls on that cell(status column): status1, status2 (green and bold), and status3 (red and bold), as per my requirement.
    2. In my flow, I set conditions as follows:
      • If the Status variable is 'BDL,' it appends to the array variable containing JSON format. In the JSON, I specify the control name where I need the text to appear, using status1 in this case. The same logic is applied for LCM and LOP values.
        
  • mmbr1606 Profile Picture
    12,286 Super User 2025 Season 1 on 04 Nov 2024 at 15:24:44
    Conditional Text Formatting for Word Template
    hey
     
     
    can you post your solution here maybe with screenshots, so others can find the answer when they have similar issues?
     
     
    thanks in advance
  • Verified answer
    kiran_g Profile Picture
    150 on 04 Nov 2024 at 15:18:23
    Conditional Text Formatting for Word Template
    Thank You for the reply @mmbr1606
     
    I've placed three controls in the same cell, applied conditions in my flow, and appended them accordingly.
  • Suggested answer
    mmbr1606 Profile Picture
    12,286 Super User 2025 Season 1 on 04 Nov 2024 at 13:47:23
    Conditional Text Formatting for Word Template
    hey
     
     
    the only thing that comes to my mind is to have a switch condition in your flow and chek for the above values.
     
    then you would need a templte for every possible choice. i have not seen that it is possible to do it dynamically only in word,
     
     
    if my answer helped please mark as verified,
     
     
    cheers

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 101

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 82 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 48 Super User 2025 Season 1

Overall leaderboard