Skip to main content

Notifications

Community site session details

Community site session details

Session Id : HCPVGe6oJPPGtOqbWBvs9r
Power Automate - General Discussion
Unanswered

How to Insert Line Breaks for Commas in Power Automate for Word

Like (1) ShareShare
ReportReport
Posted on 16 Aug 2024 06:11:01 by 2

Hi everyone,

I'm working on a Power Automate flow where I need to format text for a Word document. Specifically, I want to replace each comma (,) in the text with a line break, so that each comma is converted into a new paragraph when the text is inserted into Word.

I've tried using various methods to insert line breaks, such as \n, char(10), and HTML <br> tags, but none of these seem to be working as expected. The \n is displayed as text instead of creating a new line, and the other methods do not seem to have the desired effect.

Has anyone encountered a similar issue or have any suggestions on how to achieve this in Power Automate? Any tips or solutions would be greatly appreciated!

Thank you in advance!

  • Suggested answer
    Michael E. Gernaey Profile Picture
    41,969 Super User 2025 Season 1 on 19 Aug 2024 at 19:15:24
    How to Insert Line Breaks for Commas in Power Automate for Word
    Hi,
     
    Please try this expression, because Power Apps doesn't care lol about Char and \n etc so you use the following to get what you want.

     
    replace(yourstring,',',decodeUriComponent('%0A'))

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

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 - General Discussion

#1
David_MA Profile Picture

David_MA 8 Super User 2025 Season 1

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 8 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 7 Super User 2025 Season 1

Overall leaderboard
Loading started