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 / Opening multiple files...
Power Automate
Unanswered

Opening multiple files within Power Automate Desktop via VBScript

(0) ShareShare
ReportReport
Posted on by 34

Hello,

I am creating a Microsoft PAD flow using VBScript to filter and move data from one document to another. Am I able to open multiple files within the VBScript and have it paste into that document? 

 

For instance, with the script below, I need the filtered data from the %FilePathBrandAging% variable to paste into another document. I have the below VBScript written so far. How would I add additional documents to the script, manipulate data on those documents, and copy into a final template?

 

Set xlApp=Createobject("Excel.Application")
Set xlWbk=xlApp.Workbooks.Open("%FilePathBrandAging%")
xlApp.Visible=true
Set xlWksht = xlWbk.ActiveSheet
Set xlWksht = xlWbk.Worksheets(1)
xlWksht.Range("D:D").AutoFilter %FilterColumn%, Array("%FilterCR%","%FilterDR%"), 7
xlWksht.Range("A:U").Copy
Set xlWksht = xlWbk.Worksheets(2)
xlWksht.Range("A1").PasteSpecial
Set xlWksht = xlWbk.Worksheets(1)
xlWksht.Range("D:D").AutoFilter %FilterColumn%, "%FilterPMT%"
xlWksht.Range("A:U").Copy
Set xlWksht = xlWbk.Worksheets(3)
xlWksht.Range("A1").PasteSpecial
Set xlWksht = xlWbk.Worksheets(1)
xlWksht.Range("D:D").AutoFilter %FilterColumn%, "%FilterSLS%"
xlWksht.Range("A:S").Copy
Set xlWksht = xlWbk.Worksheets(4)
xlWksht.Range("A1").PasteSpecial
Set xlWksht = xlWbk.ActiveSheet
Set xlWksht = xlWbk.Worksheets(1)
xlWksht.Range("D:D").AutoFilter %FilterColumn%, Array("%FilterCR%","%FilterDR%", "%FilterPMT%", "%FilterSLS%"), 7

I have the same question (0)

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 538

Last 30 days Overall leaderboard