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 / "Replaced" file is sam...
Power Automate
Answered

"Replaced" file is same as input file when doing find and replace

(0) ShareShare
ReportReport
Posted on by 4

Hello,

I'm trying to do a simple document clean-up and since the document is in Word, part of the flow is to run a VB script to extract the text.

 

So I have a 2 columns in Excel, Col. A is Find and Col. B is Replace.  This is a list of spelling/grammar/etc. in a text document that I have to clean up every day so I wanted to automate it.

 

So I use ForEach and loop through CurrentItem and it saves into "Replaced".  But the output is unchanged - it hasn't actually replaced anything.

 

Since this is my first stab at it, I thought maybe an expert could spot an obvious error.  See screenshot.  Thanks!

 

Find and replace.jpg

I have the same question (0)
  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    Ahhh, you are only getting the last replaced. You told it to pull from VBScriptOutput (the original) each time it replaced and therefore it overwrote Replaced with just the one current change. 

    so, before the for each, add:  Set variable %Replaced% to %VBScriptOutput%. Then in the for each, change all %VBScriptOutput% to %Replaced% so it’s overwriting itself each time, and never pulls back the original. 

    good luck!

     

     

  • NancyS Profile Picture
    4 on at

    Thank you!  You saved my sanity 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 190

Last 30 days Overall leaderboard