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 / Inserting regular text...
Power Automate
Answered

Inserting regular text content from a txt file into word template, creates extra line breaks

(0) ShareShare
ReportReport
Posted on by 11

I'm using regular  content control for text in word template and have tried to create and set new styles and paragraphs in the word template without any success. Is there somehow possible  to insert the text without getting the extra line breaks? Any help is greatly appreciated.

 

The regular txt file

Tinkominko_1-1702460799216.png

 

The output after reading the content from Sharepoint file:

Tinkominko_3-1702461153866.png

 

After the flow has created the word file

Tinkominko_0-1702460632994.png

Tinkominko_2-1702460945598.png

Best regards

Tinkominko

 

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    Can you try using the following expression to remove the additional new lines that you are getting.

     

    replace(variables('ProductInfoContent'), decodeUriComponent('%0A%0A'), decodeUriComponent('%0A'))

    grantjenkins_0-1702462437947.png

     

    You would use the output from the expression as input into your Word document.

  • Verified answer
    Tinkominko Profile Picture
    11 on at

    Hi @grantjenkins ,

     

    Thanks for your reply. Tested out your suggestion and it didn't had the desired outcome. The out come was the same as before, BUT you gave me the clue to test out your idea and by changing your suggestion with this code:

     

     

    replace(variables('ProductInfoContent'), decodeUriComponent('%0A'),'')

    The outcome:

     

    Tinkominko_1-1702479460539.png

     

    Thanks again and have a great day 🙂

     

    Best regards

    Tinkominko

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 598

#2
Valantis Profile Picture

Valantis 477

#3
Vish WR Profile Picture

Vish WR 370

Last 30 days Overall leaderboard