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 / How to add text from w...
Power Automate
Unanswered

How to add text from webpage to Word doc and then replace a portion of that text?

(0) ShareShare
ReportReport
Posted on by 8

Title says it all. I am trying to capture some text from a webpage. Then once that text is captured I would like to add that text to a Word document. I would then like to replace a certain portion of that text with alternate text.

 

I was able to do this fairly easily in PA Desktop using .txt files in notepad. However to get it to specifically work in Word has proved more difficult. Neither PA Cloud nor Desktop have a ton of useful actions to interact with Word. So far I have gotten to the following:

 

1.) Use AI builder to extract text from the webpage

2.) Use "populate a Word template" to get the text into the Word doc

3.) ***Here is where I am stuck, what is a way I can replace the text with alternate text in the Word document?????

 

Any tips?

Categories:
I have the same question (0)
  • Heartholme Profile Picture
    1,278 Super User 2024 Season 1 on at

    Greetings @r_compton 

     

    This is quite easily achieveable. 

     

    - Enable Developer tab in your MS word. 

    - Add the text you want to replace

    - Mark the text

    - Click the Aa symbol (has to be the 'low' quality one)

    - Then hit properties and add the text field name. 

    - Populate this in your POpulate word document action. 

     

    Heartholme_1-1661500740724.png

     

    Heartholme_2-1661500771008.png

     

    Then in PowerAutomate: 

     

    Heartholme_0-1661500904919.png

     

    Let me know how it goes!

     

    { If my post answered your question, please Accept it as a solution ✔ }
    { This will in turn help others find solutions to similar questions }

    Best Regards
    Heartholme

     

     

     

  • r_compton Profile Picture
    8 on at

    Hi thank you for the response, 

     

    This part worked for me well. However, I also need to search the text in the populated MS Word document, find a specific sentence, and replace that sentence with alternate text. Is there a way to do this?

     

    Thank you.

  • Heartholme Profile Picture
    1,278 Super User 2024 Season 1 on at

    @r_compton 

     

    That is somewhat possible, but not quite in an flexible way.  You'd have to mark every sentence in your word document like above, and connect that with a variable (or Array varialbe), and put the variables in the word document. Then you should set the variable you want to change to your desired output. 

     

     

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